config

package
v0.0.0-...-7c8ce1f Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Node       NodeConfig       `mapstructure:"node"`
	DB         DBConfig         `mapstructure:"database"`
	Processing ProcessingConfig `mapstructure:"processing"`
}

Config defines all necessary parameters.

func ParseConfig

func ParseConfig() *Config

ParseConfig attempts to read and parse config.yaml from the given path An error reading or parsing the config results in a panic.

type DBConfig

type DBConfig struct {
	Host     string `mapstructure:"host"`
	Port     string `mapstructure:"port"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Database string `mapstructure:"dbname"`
}

DBConfig wraps all required parameters for database connection.

type NodeConfig

type NodeConfig struct {
	RPCNode  string `mapstructure:"rpc_node"`
	GRPCNode string `mapstructure:"grpc_node"`
	ChainID  string `mapstructure:"chain_id"`
}

NodeConfig wraps all node endpoints that are used in this project.

type ProcessingConfig

type ProcessingConfig struct {
	GenesisHeight int  `mapstructure:"genesis_height"`
	AllowSyncGap  bool `mapstructure:"allow_sync_gap"`
	IgnoreLogs    bool `mapstructure:"ignore_logs"`
}

Jump to

Keyboard shortcuts

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