Documentation
¶
Overview ¶
The config package contains structures related to the configuration of an Uqda node.
The configuration contains, amongst other things, encryption keys which are used to derive a node's identity, information about peerings and node information that is shared with the network. There are also some module-specific options related to TUN, multicast and the admin socket.
In order for a node to maintain the same identity across restarts, you should persist the configuration on to the filesystem or into some configuration storage so that the encryption keys (and therefore the node ID) do not change.
Note that Uqda will automatically populate sane defaults for any configuration option that is not provided.
Index ¶
- func GetDefaults() platformDefaultParameters
- type KeyBytes
- type MulticastInterfaceConfig
- type NodeConfig
- func (cfg *NodeConfig) GenerateSelfSignedCertificate() error
- func (cfg *NodeConfig) MarshalPEMCertificate() ([]byte, error)
- func (cfg *NodeConfig) MarshalPEMPrivateKey() ([]byte, error)
- func (cfg *NodeConfig) NewPrivateKey()
- func (cfg *NodeConfig) ReadFrom(r io.Reader) (int64, error)
- func (cfg *NodeConfig) UnmarshalHJSON(b []byte) error
- func (cfg *NodeConfig) UnmarshalPEMPrivateKey(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaults ¶
func GetDefaults() platformDefaultParameters
Types ¶
type NodeConfig ¶
type NodeConfig struct {
PrivateKey KeyBytes `json:",omitempty" comment:"Your private key. DO NOT share this with anyone!"`
PrivateKeyPath string `json:",omitempty" comment:"The path to your private key file in PEM format."`
Certificate *tls.Certificate `json:"-"`
Peers []string `` /* 529-byte string literal not displayed */
InterfacePeers map[string][]string `` /* 335-byte string literal not displayed */
Listen []string `` /* 414-byte string literal not displayed */
AdminListen string `` /* 276-byte string literal not displayed */
AdminSocketMode string `` /* 225-byte string literal not displayed */
AdminToken string `` /* 219-byte string literal not displayed */
MetricsListen string `` /* 165-byte string literal not displayed */
UIListen string `` /* 152-byte string literal not displayed */
StunServers []string `` /* 223-byte string literal not displayed */
MulticastInterfaces []MulticastInterfaceConfig `` /* 491-byte string literal not displayed */
AllowedPublicKeys []string `` /* 371-byte string literal not displayed */
IfName string `` /* 138-byte string literal not displayed */
IfMTU uint64 `` /* 170-byte string literal not displayed */
LogLookups bool `json:",omitempty"`
DebugRemoteEnabled bool `` /* 201-byte string literal not displayed */
NodeInfoPrivacy bool `` /* 309-byte string literal not displayed */
NodeName string `` /* 134-byte string literal not displayed */
NodeInfo map[string]interface{} `` /* 176-byte string literal not displayed */
}
NodeConfig is the main configuration structure, containing configuration options that are necessary for an Uqda node to run. You will need to supply one of these structs to the Uqda core when starting a node.
func GenerateConfig ¶
func GenerateConfig() *NodeConfig
Generates default configuration and returns a pointer to the resulting NodeConfig. This is used when outputting the -genconf parameter and also when using -autoconf.
func (*NodeConfig) GenerateSelfSignedCertificate ¶
func (cfg *NodeConfig) GenerateSelfSignedCertificate() error
func (*NodeConfig) MarshalPEMCertificate ¶
func (cfg *NodeConfig) MarshalPEMCertificate() ([]byte, error)
func (*NodeConfig) MarshalPEMPrivateKey ¶
func (cfg *NodeConfig) MarshalPEMPrivateKey() ([]byte, error)
func (*NodeConfig) NewPrivateKey ¶
func (cfg *NodeConfig) NewPrivateKey()
func (*NodeConfig) UnmarshalHJSON ¶
func (cfg *NodeConfig) UnmarshalHJSON(b []byte) error
func (*NodeConfig) UnmarshalPEMPrivateKey ¶
func (cfg *NodeConfig) UnmarshalPEMPrivateKey(b []byte) error