toml

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountConfig

type AccountConfig struct {
	Key    string `toml:"key,omitempty"`
	Unlock string `toml:"unlock,omitempty"`
}

AccountConfig is to marshal/unmarshal account config vars

type Config

type Config struct {
	Global  GlobalConfig  `toml:"global,omitempty"`
	Log     LogConfig     `toml:"log,omitempty"`
	Init    InitConfig    `toml:"init,omitempty"`
	Account AccountConfig `toml:"account,omitempty"`
	Core    CoreConfig    `toml:"core,omitempty"`
	Network NetworkConfig `toml:"network,omitempty"`
	RPC     RPCConfig     `toml:"rpc,omitempty"`
}

Config is a collection of configurations throughout the system

type CoreConfig

type CoreConfig struct {
	Roles                    byte   `toml:"roles,omitempty"`
	BabeAuthority            bool   `toml:"babe-authority"`
	GrandpaAuthority         bool   `toml:"grandpa-authority"`
	BabeThresholdNumerator   uint64 `toml:"babe-threshold-numerator,omitempty"`
	BabeThresholdDenominator uint64 `toml:"babe-threshold-denominator,omitempty"`
	SlotDuration             uint64 `toml:"slot-duration,omitempty"`
	EpochLength              uint64 `toml:"epoch-length,omitempty"`
	WasmInterpreter          string `toml:"wasm-interpreter,omitempty"`
}

CoreConfig is to marshal/unmarshal toml core config vars

type GlobalConfig

type GlobalConfig struct {
	Name     string `toml:"name,omitempty"`
	ID       string `toml:"id,omitempty"`
	BasePath string `toml:"basepath,omitempty"`
	LogLvl   string `toml:"log,omitempty"`
}

GlobalConfig is to marshal/unmarshal toml global config vars

type InitConfig

type InitConfig struct {
	GenesisRaw string `toml:"genesis-raw,omitempty"`
}

InitConfig is the configuration for the node initialization

type LogConfig

type LogConfig struct {
	CoreLvl           string `toml:"core,omitempty"`
	SyncLvl           string `toml:"sync,omitempty"`
	NetworkLvl        string `toml:"network,omitempty"`
	RPCLvl            string `toml:"rpc,omitempty"`
	StateLvl          string `toml:"state,omitempty"`
	RuntimeLvl        string `toml:"runtime,omitempty"`
	BlockProducerLvl  string `toml:"babe,omitempty"`
	FinalityGadgetLvl string `toml:"grandpa,omitempty"`
}

LogConfig represents the log levels for individual packages

type NetworkConfig

type NetworkConfig struct {
	Port        uint32   `toml:"port,omitempty"`
	Bootnodes   []string `toml:"bootnodes,omitempty"`
	ProtocolID  string   `toml:"protocol,omitempty"`
	NoBootstrap bool     `toml:"nobootstrap,omitempty"`
	NoMDNS      bool     `toml:"nomdns,omitempty"`
	MinPeers    int      `toml:"min-peers,omitempty"`
	MaxPeers    int      `toml:"max-peers,omitempty"`
}

NetworkConfig is to marshal/unmarshal toml network config vars

type RPCConfig

type RPCConfig struct {
	Enabled    bool     `toml:"enabled,omitempty"`
	External   bool     `toml:"external,omitempty"`
	Port       uint32   `toml:"port,omitempty"`
	Host       string   `toml:"host,omitempty"`
	Modules    []string `toml:"modules,omitempty"`
	WSPort     uint32   `toml:"ws-port,omitempty"`
	WS         bool     `toml:"ws,omitempty"`
	WSExternal bool     `toml:"ws-external,omitempty"`
}

RPCConfig is to marshal/unmarshal toml RPC config vars

Jump to

Keyboard shortcuts

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