config

package
v0.3.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DevnetProtocolPrefix  = "/devnet"
	TestnetProtocolPrefix = "/testnet"
	MainnetProtocolPrefix = "/mainnet"
)
View Source
const (
	ServerMode_Server = "server"
	ServerMode_Client = "client"
	ServerMode_Auto   = "auto"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenPort     int
	ConnManager    connmgr.ConnManager
	BootPeers      []string
	Workspace      string
	PrivatekeyPath string
	ProtocolPrefix string
	PublicIpv4     string
	BucketSize     int
	Version        string
}

Config describes a set of settings for a libp2p node

func (*Config) Apply

func (cfg *Config) Apply(opts ...Option) error

Apply applies the given options to the config, returning the first error encountered (if any).

type Option

type Option func(cfg *Config) error

Option is a libp2p config option that can be given to the libp2p constructor (`libp2p.New`).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL