Documentation ¶
Overview ¶
Package common provides utilities to set network options.
Index ¶
- type LogstoreType
- type NetBoostrapper
- type NetConfig
- type NetOption
- func WithAnnounceAddr(addr ma.Multiaddr) NetOption
- func WithConnectionManager(cm cconnmgr.ConnManager) NetOption
- func WithNetBadgerPersistence(repoPath string) NetOption
- func WithNetDebug(enabled bool) NetOption
- func WithNetGRPCDialOptions(opts ...grpc.DialOption) NetOption
- func WithNetGRPCServerOptions(opts ...grpc.ServerOption) NetOption
- func WithNetHostAddr(addr ma.Multiaddr) NetOption
- func WithNetLogstore(lt LogstoreType) NetOption
- func WithNetMongoPersistence(uri, db string) NetOption
- func WithNetPubSub(enabled bool) NetOption
- func WithNetPulling(threadLimit uint, startAfter, initialInterval, interval time.Duration) NetOption
- func WithNoExchangeEdgesMigration(disable bool) NetOption
- func WithNoNetPulling(disable bool) NetOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogstoreType ¶ added in v1.0.1
type LogstoreType string
const ( LogstoreInMemory LogstoreType = "in-memory" LogstorePersistent LogstoreType = "persistent" LogstoreHybrid LogstoreType = "hybrid" )
type NetBoostrapper ¶
type NetBoostrapper interface { app.Net GetIpfsLite() *ipfslite.Peer Bootstrap(addrs []peer.AddrInfo) }
func DefaultNetwork ¶
func DefaultNetwork(opts ...NetOption) (NetBoostrapper, error)
DefaultNetwork is a boostrapable default Net with sane defaults.
type NetConfig ¶
type NetConfig struct { NetPullingLimit uint NetPullingStartAfter time.Duration NetPullingInitialInterval time.Duration NetPullingInterval time.Duration NoNetPulling bool NoExchangeEdgesMigration bool PubSub bool LSType LogstoreType BadgerRepoPath string MongoUri string MongoDB string HostAddr ma.Multiaddr AnnounceAddr ma.Multiaddr ConnManager cconnmgr.ConnManager GRPCServerOptions []grpc.ServerOption GRPCDialOptions []grpc.DialOption Debug bool }
type NetOption ¶
func WithAnnounceAddr ¶ added in v1.1.3
func WithConnectionManager ¶ added in v0.1.18
func WithConnectionManager(cm cconnmgr.ConnManager) NetOption
func WithNetBadgerPersistence ¶ added in v1.1.0
func WithNetDebug ¶
func WithNetGRPCDialOptions ¶ added in v1.0.0
func WithNetGRPCDialOptions(opts ...grpc.DialOption) NetOption
func WithNetGRPCServerOptions ¶ added in v1.0.0
func WithNetGRPCServerOptions(opts ...grpc.ServerOption) NetOption
func WithNetHostAddr ¶
func WithNetLogstore ¶ added in v1.0.1
func WithNetLogstore(lt LogstoreType) NetOption
func WithNetMongoPersistence ¶ added in v1.1.0
func WithNetPubSub ¶ added in v1.0.0
func WithNetPulling ¶ added in v1.1.0
func WithNoExchangeEdgesMigration ¶ added in v1.1.2
func WithNoNetPulling ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.