config

package
v0.0.0-...-197aa00 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PrometheusConfigPath = "/home/lovelace/prometheus/"

Variables

View Source
var ProducerHostsList map[string][]NodeShort
View Source
var RelaysHostsList map[string][]NodeShort

Functions

This section is empty.

Types

type C

type C struct {
	Mapped
	TestMode bool
	// contains filtered or unexported fields
}

func New

func New(configFile string, testmode bool, logLevel string) (c *C, err error)

func (*C) LogLevel

func (c *C) LogLevel() string

func (*C) SetLogMinSeverity

func (c *C) SetLogMinSeverity(logMinSeverity string, id int, isProducer bool) error

type Mapped

type Mapped struct {
	TestnetPortBase   uint `mapstructure:"testnet_port_base"`
	TestnetRTPortBase uint `mapstructure:"testnet_rt_port_base"`

	MainnetPortBase   uint `mapstructure:"mainnet_port_base"`
	MainnetRTPortBase uint `mapstructure:"mainnet_rt_port_base"`

	SecretsPath     string `mapstructure:"secrets_path"`
	Producers       []Node `mapstructure:"producers"`
	Relays          []Node `mapstructure:"relays"`
	RelaysHostsList map[string][]NodeShort

	PrometheusConfigPath string
}

type Node

type Node struct {
	Name          string
	Host          string      `mapstructure:"host"`
	LHost         string      `mapstructure:"host"`
	IP            string      `mapstructure:"ip"`
	Network       string      `mapstructure:"network"`
	Port          uint        `mapstructure:"port"`
	Era           string      `mapstructure:"era"`
	Peers         uint        `mapstructure:"peers"`
	RtViewPort    uint        `mapstructure:"rtview_port"`
	PromeNExpPort uint        `mapstructure:"prom_node_port"`
	TestMode      bool        `mapstructure:"test_mode"`
	Pool          string      `mapstructure:"pool"`
	Producers     []NodeShort `mapstructure:"producer"`
	IsProducer    bool        `mapstructure:"is_producer"`
	RootDir       string      `mapstructure:"root_dir"`
	BackupDir     string      `mapstructure:"backup_dir"`

	ExtRelays   []NodeShort `mapstructure:"ext_relays"`
	ExtProducer []NodeShort `mapstructure:"ext_producer"`

	NetworkMagic uint64
	TmpDir       string
	Relays       []NodeShort

	PassiveMode bool

	LogMinSeverity    string `mapstructure:"log_min_severity"`
	FilterMinSeverity string `mapstructure:"filter_min_severity"`
}

type NodeShort

type NodeShort struct {
	Port uint   `mapstructure:"port"`
	Host string `mapstructure:"host"`
}

Jump to

Keyboard shortcuts

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