Documentation ¶
Overview ¶
Package common provides utilities to set network options.
Index ¶
- Variables
- type LogstoreType
- type NetBoostrapper
- type NetConfig
- type 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 ¶
View Source
var HostKey crypto.PrivKey
Functions ¶
This section is empty.
Types ¶
type LogstoreType ¶
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 ConnManager cconnmgr.ConnManager GRPCServerOptions []grpc.ServerOption GRPCDialOptions []grpc.DialOption Debug bool }
type NetOption ¶
func WithConnectionManager ¶
func WithConnectionManager(cm cconnmgr.ConnManager) NetOption
func WithNetDebug ¶
func WithNetGRPCDialOptions ¶
func WithNetGRPCDialOptions(opts ...grpc.DialOption) NetOption
func WithNetGRPCServerOptions ¶
func WithNetGRPCServerOptions(opts ...grpc.ServerOption) NetOption
func WithNetHostAddr ¶
func WithNetLogstore ¶
func WithNetLogstore(lt LogstoreType) NetOption
func WithNetMongoPersistence ¶
func WithNetPubSub ¶
func WithNetPulling ¶
func WithNoNetPulling ¶
Click to show internal directories.
Click to hide internal directories.