Versions in this module Expand all Collapse all v0 v0.0.1 Aug 17, 2020 Changes in this version + var AutoRelay = simpleOpt(libp2p.ChainOptions(libp2p.EnableAutoRelay(), libp2p.DefaultStaticRelays())) + var DHTClientOption = constructDHTRouting(dht.ModeClient) + var DHTOption RoutingOption = constructDHTRouting(dht.ModeAuto) + var DHTServerOption = constructDHTRouting(dht.ModeServer) + var NatPortMap = simpleOpt(libp2p.NATPortMap()) + var NilRouterOption = constructNilRouting + var UserAgent = simpleOpt(libp2p.UserAgent(version.UserAgent)) + func AddrFilters(filters []string) func() (*ma.Filters, Libp2pOpts, error) + func AddrsFactory(announce []string, noAnnounce []string) func() (opts Libp2pOpts, err error) + func AutoNATService(throttle *config.AutoNATThrottleConfig) func() Libp2pOpts + func BaseRouting(lc fx.Lifecycle, in BaseIpfsRouting) (out p2pRouterOut, dr *ddht.DHT) + func ConnectionManager(low, high int, grace time.Duration) func() (opts Libp2pOpts, err error) + func DiscoveryHandler(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host) *discoveryHandler + func FloodSub(pubsubOptions ...pubsub.Option) interface + func GossipSub(pubsubOptions ...pubsub.Option) interface + func PNet(repo repo.Repo) (opts Libp2pOpts, fp PNetFingerprint, err error) + func PNetChecker(repo repo.Repo, ph host.Host, lc fx.Lifecycle) error + func Peerstore(lc fx.Lifecycle) peerstore.Peerstore + func PstoreAddSelfKeys(id peer.ID, sk crypto.PrivKey, ps peerstore.Peerstore) error + func PubsubRouter(mctx helpers.MetricsCtx, lc fx.Lifecycle, in p2pPSRoutingIn) (p2pRouterOut, *namesys.PubsubValueStore, error) + func Relay(enableRelay, enableHop bool) func() (opts Libp2pOpts, err error) + func Routing(in p2pOnlineRoutingIn) routing.Routing + func Security(enabled bool, tptConfig config.Transports) interface + func SetupDiscovery(mdns bool, mdnsInterval int) func(helpers.MetricsCtx, fx.Lifecycle, host.Host, *discoveryHandler) error + func SmuxTransport(tptConfig config.Transports) func() (opts Libp2pOpts, err error) + func StartListening(addresses []string) func(host host.Host) error + func TopicDiscovery() interface + func Transports(tptConfig config.Transports) interface + type BaseIpfsRouting routing.Routing + type HostOption func(ctx context.Context, id peer.ID, ps peerstore.Peerstore, ...) (host.Host, error) + var DefaultHostOption HostOption = constructPeerHost + type Libp2pOpts struct + Opts []libp2p.Option + func BandwidthCounter() (opts Libp2pOpts, reporter *metrics.BandwidthCounter) + type P2PHostIn struct + HostOption HostOption + ID peer.ID + Opts [][]libp2p.Option + Peerstore peerstore.Peerstore + Repo repo.Repo + RoutingOption RoutingOption + Validator record.Validator + type P2PHostOut struct + Host host.Host + Routing BaseIpfsRouting + func Host(mctx helpers.MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut, err error) + type PNetFingerprint []byte + type Router struct + Priority int + type RoutingOption func(context.Context, host.Host, datastore.Batching, record.Validator, ...) (routing.Routing, error)