Documentation ¶
Index ¶
- Constants
- Variables
- func Bootstrapper(lc fx.Lifecycle, cfg config.Config, tm *taskmanager.TaskManager, h host.Host) error
- func Identity(conf config.Config) (crypto.PrivKey, error)
- func Libp2p(ctx context.Context, lc fx.Lifecycle, conf config.Config, priv crypto.PrivKey) (host.Host, routing.Routing, error)
- func LocalDialer(lc fx.Lifecycle) (host.Host, error)
- func NewMDNSDiscovery(ctx context.Context, h host.Host) error
- func NewNode(ctx context.Context, h host.Host, dht routing.Routing, ...) (*ipfslite.Peer, error)
- func NewP2PReporter(h host.Host, st status.Manager)
- func NewSvcDiscovery(r routing.Routing) discovery.Discovery
- func Pubsub(ctx context.Context, h host.Host) (*pubsub.PubSub, error)
Constants ¶
View Source
const Rendezvous string = "/msuite/node"
Variables ¶
View Source
var FilesModule = fx.Provide(fx.Annotate(NewNode, fx.ParamTags(``, `name:"mainHost"`, ``, ``)))
View Source
var Libp2pOptionsExtra = []libp2p.Option{ libp2p.NATPortMap(), libp2p.ConnectionManager(func() *connmgr.BasicConnMgr { connMgr, _ := connmgr.NewConnManager(100, 500, connmgr.WithGracePeriod(time.Minute)) return connMgr }()), libp2p.EnableAutoRelay(), libp2p.EnableNATService(), libp2p.Security(libp2ptls.ID, libp2ptls.New), }
View Source
var P2PModule = fx.Options( fx.Provide(Identity), fx.Provide(fx.Annotate(Libp2p, fx.ResultTags(`name:"mainHost"`, ``, ``))), fx.Provide(fx.Annotate(LocalDialer, fx.ResultTags(`name:"localDialer"`))), fx.Provide(fx.Annotate(Pubsub, fx.ParamTags(``, `name:"mainHost"`))), fx.Provide(NewSvcDiscovery), fx.Invoke(fx.Annotate(NewMDNSDiscovery, fx.ParamTags(``, `name:"mainHost"`))), fx.Invoke(fx.Annotate(NewP2PReporter, fx.ParamTags(`name:"mainHost"`, ``))), fx.Invoke(fx.Annotate(Bootstrapper, fx.ParamTags(``, ``, ``, `name:"mainHost"`))), )
Functions ¶
func Bootstrapper ¶
func Bootstrapper( lc fx.Lifecycle, cfg config.Config, tm *taskmanager.TaskManager, h host.Host, ) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.