Documentation ¶
Index ¶
- type Config
- type Option
- func WithDefaultBootstraps(peers []peer.Shorthand) Option
- func WithDefaultDefaultPeerBindAddress(address string) Option
- func WithDefaultFilename(filename string) Option
- func WithDefaultListenOnExternalPort() Option
- func WithDefaultListenOnLocalIPs() Option
- func WithDefaultListenOnPrivateIPs() Option
- func WithDefaultPath(path string) Option
- func WithDefaultPrivateKey(key crypto.PrivateKey) Option
- func WithExtraConfig(key string, data interface{}) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Path string `json:"-"` LogLevel string `json:"logLevel" envconfig:"LOG_LEVEL"` Peer struct { PrivateKey crypto.PrivateKey `json:"privateKey" envconfig:"PRIVATE_KEY"` BindAddress string `json:"bindAddress" envconfig:"BIND_ADDRESS"` Bootstraps []peer.Shorthand `json:"bootstraps" envconfig:"BOOTSTRAPS"` ListenOnLocalIPs bool `json:"listenLocalIPs" envconfig:"LISTEN_LOCAL"` ListenOnPrivateIPs bool `json:"listenPrivateIPs" envconfig:"LISTEN_PRIVATE"` ListenOnExternalPort bool `json:"listenExternalPort" envconfig:"LISTEN_EXTERNAL_PORT"` } `json:"peer" envconfig:"PEER"` Extras map[string]json.RawMessage `json:"extras,omitempty"` // contains filtered or unexported fields }
type Option ¶
type Option func(*Config)
func WithDefaultBootstraps ¶
func WithDefaultFilename ¶
func WithDefaultListenOnExternalPort ¶
func WithDefaultListenOnExternalPort() Option
func WithDefaultListenOnLocalIPs ¶
func WithDefaultListenOnLocalIPs() Option
func WithDefaultListenOnPrivateIPs ¶
func WithDefaultListenOnPrivateIPs() Option
func WithDefaultPath ¶
func WithDefaultPrivateKey ¶
func WithDefaultPrivateKey(key crypto.PrivateKey) Option
func WithExtraConfig ¶
Click to show internal directories.
Click to hide internal directories.