config

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: LGPL-3.0 Imports: 2 Imported by: 4

Documentation

Overview

The config package contains structures related to the configuration of an RiV-mesh 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 onto the filesystem or into some configuration storage so that the encryption keys (and therefore the node ID) do not change.

Note that RiV-mesh will automatically populate sane defaults for any configuration option that is not provided.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MulticastInterfaceConfig

type MulticastInterfaceConfig struct {
	Regex    string
	Beacon   bool
	Listen   bool
	Port     uint16
	Priority uint8
}

type NodeConfig

type NodeConfig struct {
	Peers               []string                   `` /* 286-byte string literal not displayed */
	InterfacePeers      map[string][]string        `` /* 267-byte string literal not displayed */
	Listen              []string                   `` /* 343-byte string literal not displayed */
	AdminListen         string                     `` /* 318-byte string literal not displayed */
	HttpAddress         string                     `` /* 228-byte string literal not displayed */
	WwwRoot             string                     `comment:"Points out to embedded webserver root folder path where web interface assets are located.\nExample:/apps/mesh/www."`
	MulticastInterfaces []MulticastInterfaceConfig `` /* 602-byte string literal not displayed */
	AllowedPublicKeys   []string                   `` /* 256-byte string literal not displayed */
	PublicKey           string                     `comment:"Your public key. Your peers may ask you for this to put\ninto their AllowedPublicKeys configuration."`
	PrivateKey          string                     `comment:"Your private key. DO NOT share this with anyone!"`
	IfName              string                     `` /* 138-byte string literal not displayed */
	IfMTU               uint64                     `` /* 170-byte string literal not displayed */
	NodeInfoPrivacy     bool                       `` /* 313-byte string literal not displayed */
	NodeInfo            map[string]interface{}     `` /* 177-byte string literal not displayed */
}

NodeConfig is the main configuration structure, containing configuration options that are necessary for an RiV-mesh node to run. You will need to supply one of these structs to the RiV-mesh core when starting a node.

func (*NodeConfig) NewKeys

func (cfg *NodeConfig) NewKeys()

NewSigningKeys replaces the signing keypair in the NodeConfig with a new signing keypair. The signing keys are used by the switch to derive the structure of the spanning tree.

Jump to

Keyboard shortcuts

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