config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0, MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const DHTClientMode = "client"
View Source
const DHTFullMode = "full"
View Source
const DHTServerMode = "server"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	Enabled bool
	Peers   MaddrArray
}

type Config

type Config struct {
	ListenAddr        JSONMaddr
	Quiet             bool
	ID                string
	Bootstrap         Bootstrap
	DHT               DHT
	ConnectionManager ConnectionManager
	QUIC              bool
	NatPortMap        bool
	PubSub            PubSub
	Relay             Relay
	AutoNat           bool
	HostAddresses     MaddrArray
	AnnounceAddresses MaddrArray
	NoListen          bool
	MetricsAddress    string
	PProf             PProf
	Security          Security
}

func NewDefaultConfig

func NewDefaultConfig() Config

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(b []byte) error

func (*Config) Validate

func (c *Config) Validate() error

type ConnectionManager

type ConnectionManager struct {
	Enabled       bool
	LowWaterMark  int
	HighWaterMark int
	GracePeriod   time.Duration
}

type DHT

type DHT struct {
	Mode string
}

type GossipSubHeartbeat

type GossipSubHeartbeat struct {
	Interval     time.Duration
	InitialDelay time.Duration
}

type JSONMaddr

type JSONMaddr struct {
	multiaddr.Multiaddr
}

func (*JSONMaddr) UnmarshalJSON

func (jm *JSONMaddr) UnmarshalJSON(b []byte) error

type MaddrArray

type MaddrArray []multiaddr.Multiaddr

func (*MaddrArray) UnmarshalJSON

func (maa *MaddrArray) UnmarshalJSON(b []byte) error

type PProf

type PProf struct {
	Enabled bool
	Port    uint
}

type PubSub

type PubSub struct {
	Enabled            bool
	Router             string
	Sign               bool
	SignStrict         bool
	GossipSubHeartbeat GossipSubHeartbeat
}

type Relay

type Relay struct {
	Enabled   bool
	Active    bool
	Hop       bool
	Discovery bool
	Auto      bool
	HopLimit  int
}

type Security added in v0.2.4

type Security struct {
	Noise bool
	TLS   bool
}

Jump to

Keyboard shortcuts

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