config

package
v0.0.0-...-33617a9 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 4 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"`
	Market     MarketConfig     `mapstructure:"market"`
	Prometheus PrometheusConfig `mapstructure:"prometheus"`
}

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"`
	Table    string `mapstructure:"table"`
}

DBConfig wraps all required parameters for database connection.

type MarketConfig

type MarketConfig struct {
	CoinGeckoEndpoint string `mapstructure:"coingecko_endpoint"`
}

MarketConfig wraps all required params for market endpoints.

type NodeConfig

type NodeConfig struct {
	RPCNode                string               `mapstructure:"rpc_node"`
	AcceleratedNode        string               `mapstructure:"accelerated_node"`
	APIServerEndpoint      string               `mapstructure:"api_server_endpoint"`
	ExplorerServerEndpoint string               `mapstructure:"explorer_server_endpoint"`
	NetworkType            cmtypes.ChainNetwork `mapstructure:"network_type"`
}

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

type PrometheusConfig

type PrometheusConfig struct {
	Port      string `mapstructure:"port"`
	Path      string `mapstructure:"path"`
	Namespace string `mapstructure:"namespace"`
}

PrometheusConfig wraps all required params for metrics scraping.

Jump to

Keyboard shortcuts

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