config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 19 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"`
	WalletManager *wallet.Config    `toml:"-"`
	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 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.

type NodeConfigError added in v1.1.3

type NodeConfigError struct {
	Reason string
}

NodeConfigError is returned when the config configuration is invalid.

func (NodeConfigError) Error added in v1.1.3

func (e NodeConfigError) Error() string

Jump to

Keyboard shortcuts

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