config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveMainnetConfig

func SaveMainnetConfig(path string) error

Types

type BootstrapInfo added in v1.0.0

type BootstrapInfo struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Website string `json:"website"`
	Address string `json:"address"`
}

type Config

type Config struct {
	Node      *NodeConfig       `toml:"node"`
	Store     *store.Config     `toml:"store"`
	Network   *network.Config   `toml:"network"`
	Sync      *sync.Config      `toml:"sync"`
	TxPool    *txpool.Config    `toml:"tx_pool"`
	Consensus *consensus.Config `toml:"-"`
	Logger    *logger.Config    `toml:"logger"`
	GRPC      *grpc.Config      `toml:"grpc"`
	JSONRPC   *jsonrpc.Config   `toml:"jsonrpc"`
	HTTP      *http.Config      `toml:"http"`
	Nanomsg   *nanomsg.Config   `toml:"nanomsg"`
}

func DefaultConfigLocalnet added in v0.17.0

func DefaultConfigLocalnet() *Config

func DefaultConfigMainnet added in v0.17.0

func DefaultConfigMainnet() *Config

func DefaultConfigTestnet added in v0.17.0

func DefaultConfigTestnet() *Config

func LoadFromFile

func LoadFromFile(file string, strict bool, defaultConfig *Config) (*Config, error)

func (*Config) BasicCheck added in v0.15.0

func (conf *Config) BasicCheck() error

BasicCheck performs basic checks on the configuration.

func (*Config) Save added in v0.18.0

func (conf *Config) Save(path string) error

type Error added in v1.1.0

type Error struct {
	Reason string
}

Error is returned when the config configuration is invalid.

func (Error) Error added in v1.1.0

func (e Error) Error() string

type NodeConfig

type NodeConfig struct {
	RewardAddresses []string `toml:"reward_addresses"`
}

func DefaultNodeConfig

func DefaultNodeConfig() *NodeConfig

func (*NodeConfig) BasicCheck added in v0.15.0

func (conf *NodeConfig) BasicCheck() error

BasicCheck performs basic checks on the configuration.

Jump to

Keyboard shortcuts

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