"go.uber.org/fx")// Peering constructs the peering service and hooks it into fx's lifetime// management system.funcPeering(lcfx.Lifecycle,hosthost.Host)*peering.PeeringService{ps:=peering.NewPeeringService(host)lc.Append(fx.Hook{OnStart:func(context.Context)error{returnps.Start()},OnStop:func(context.Context)error{returnps.Stop()},})returnps}// PeerWith configures the peering service to peer with the specified peers.funcPeerWith(peers...peer.AddrInfo)fx.Option{returnfx.Invoke(func(ps*peering.PeeringService){for_,ai:=rangepeers{ps.AddPeer(ai)}})}