config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLConfig

type ACLConfig struct {
	AllowPeers   []string `json:"allow_peers"`
	AllowSubnets []string `json:"allow_subnets"`
}

type Config

type Config struct {
	PeerKey   string        `json:"peer_key"`
	P2PHost   string        `json:"p2p_host"`
	ServePath string        `json:"serve_path"`
	Network   NetworkConfig `json:"network"`
	ACL       ACLConfig     `json:"acl"`
	Proxy     *ProxyConfig  `json:"proxy"`
}

func Default

func Default() Config

func LoadConfig

func LoadConfig(cfgPath string) (Config, error)

type NetworkConfig

type NetworkConfig struct {
	EnableNAT   bool     `json:"enable_nat"`
	ListenAddrs []string `json:"listen_addrs"`
	Relays      []string `json:"relays"`
}

type ProxyConfig

type ProxyConfig struct {
	Addr       string `json:"addr"`
	ServerPeer string `json:"server_peer"`
}

Jump to

Keyboard shortcuts

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