Documentation ¶
Index ¶
- Variables
- func AddrFilters(filters []string) func() (opts Libp2pOpts, err error)
- func AddrsFactory(announce []string, noAnnounce []string) func() (opts Libp2pOpts, err error)
- func AdvertiseRelay(mctx helpers.MetricsCtx, d coredisc.Discovery)
- func AutoRelay(mctx helpers.MetricsCtx, lc fx.Lifecycle, router BaseIpfsRouting, h RawHost, ...) error
- func BaseRouting(lc fx.Lifecycle, in BaseIpfsRouting) (out p2pRouterOut, dr *dht.IpfsDHT)
- func ConnectionManager(low, high int, grace time.Duration) func() (opts Libp2pOpts, err error)
- func DHTRouting(client bool) interface{}
- func Discovery(router BaseIpfsRouting) (coredisc.Discovery, error)
- func DiscoveryHandler(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host) *discoveryHandler
- func GossipSub(pubsubOptions ...PubsubOpt) interface{}
- func PNet() (opts Libp2pOpts, fp PNetFingerprint, err error)
- func PrivKey(ks types.KeyStore) (crypto.PrivKey, error)
- func PstoreAddSelfKeys(id peer.ID, sk crypto.PrivKey, ps peerstore.Peerstore) error
- func Relay(disable, enableHop bool) func() (opts Libp2pOpts, err error)
- func RoutedHost(rh RawHost, r BaseIpfsRouting) host.Host
- func Routing(in p2pOnlineRoutingIn) routing.Routing
- func Security(enabled, preferTLS bool) interface{}
- func SmuxTransport(mplex bool) func() (opts Libp2pOpts, err error)
- func StartListening(addresses []string) func(host host.Host) error
- type BaseIpfsRouting
- type Libp2pOpts
- type P2PHostIn
- type PNetFingerprint
- type PubsubOpt
- type RawHost
- type Router
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTransports = simpleOpt(libp2p.DefaultTransports)
View Source
var LotusKey = "/key/swarm/psk/1.0.0/\n/base16/\n20c72388e6299c7bbc1b501fdcc8abe4f89f798e9b93b2d2bc02e3c29b6a088e"
View Source
var NatPortMap = simpleOpt(libp2p.NATPortMap())
View Source
var QUIC = simpleOpt(libp2p.Transport(libp2pquic.NewTransport))
Functions ¶
func AddrFilters ¶
func AddrFilters(filters []string) func() (opts Libp2pOpts, err error)
func AddrsFactory ¶
func AddrsFactory(announce []string, noAnnounce []string) func() (opts Libp2pOpts, err error)
func AdvertiseRelay ¶
func AdvertiseRelay(mctx helpers.MetricsCtx, d coredisc.Discovery)
NOTE: only set when relayHop is set
func AutoRelay ¶
func AutoRelay(mctx helpers.MetricsCtx, lc fx.Lifecycle, router BaseIpfsRouting, h RawHost, d coredisc.Discovery) error
NOTE: only set when relayHop is not set
func BaseRouting ¶
func BaseRouting(lc fx.Lifecycle, in BaseIpfsRouting) (out p2pRouterOut, dr *dht.IpfsDHT)
func ConnectionManager ¶
func ConnectionManager(low, high int, grace time.Duration) func() (opts Libp2pOpts, err error)
func DHTRouting ¶
func DHTRouting(client bool) interface{}
func Discovery ¶
func Discovery(router BaseIpfsRouting) (coredisc.Discovery, error)
TODO: should be use baseRouting or can we use higher level router here?
func DiscoveryHandler ¶
func PNet ¶
func PNet() (opts Libp2pOpts, fp PNetFingerprint, err error)
func PstoreAddSelfKeys ¶
func Relay ¶
func Relay(disable, enableHop bool) func() (opts Libp2pOpts, err error)
func RoutedHost ¶
func RoutedHost(rh RawHost, r BaseIpfsRouting) host.Host
func SmuxTransport ¶
func SmuxTransport(mplex bool) func() (opts Libp2pOpts, err error)
Types ¶
type BaseIpfsRouting ¶
func NilRouting ¶
func NilRouting(mctx helpers.MetricsCtx) (BaseIpfsRouting, error)
type Libp2pOpts ¶
func BandwidthCounter ¶
func BandwidthCounter() (opts Libp2pOpts, reporter metrics.Reporter)
type PNetFingerprint ¶
type PNetFingerprint []byte
type PubsubOpt ¶
func PubsubTracer ¶
func PubsubTracer() PubsubOpt
Click to show internal directories.
Click to hide internal directories.