config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoingeckoConfig

type CoingeckoConfig struct {
	ApiURL   string            `long:"ApiURL"`
	AssetIds map[string]string `long:"AssetIds"`
}

type CometBFTConfig

type CometBFTConfig struct {
	ApiURL string `long:"ApiURL"`
}

type Config

type Config struct {
	Coingecko CoingeckoConfig `group:"Coingecko" namespace:"coingecko"`

	LocalNode LocalNodeConfig `group:"LocalNode" namespace:"localnode"`

	DataNode []DataNodeConfig `group:"DataNode" namespace:"datanode"`

	Ethereum EthereumConfig `group:"Ethereum" namespace:"ethereum"`

	Logging struct {
		Level string `long:"Level"`
	} `group:"Logging" namespace:"logging"`

	SQLStore SQLStoreConfig `group:"Sqlstore" namespace:"sqlstore"`

	Prometheus PrometheusConfig `group:"Prometheus" namespace:"prometheus"`

	Services struct {
		BlockSigners struct {
			Enabled bool `long:"enabled"`
		} `group:"BlockSigners" namespace:"blocksigners"`
		NetworkHistorySegments struct {
			Enabled bool `long:"enabled"`
		} `group:"NetworkHistorySegments" namespace:"networkhistorysegments"`
		CometTxs struct {
			Enabled bool `long:"enabled"`
		} `group:"CometTxs" namespace:"comettxs"`
		NetworkBalances struct {
			Enabled bool `long:"enabled"`
		} `group:"NetworkBalances" namespace:"networkbalances"`
		AssetPrices struct {
			Enabled bool `long:"enabled"`
		} `group:"AssetPrices" namespace:"assetprices"`
	} `group:"Services" namespace:"services"`
}

func GetConfigAndLogger

func GetConfigAndLogger(configFilePath string, forceDebug bool) (*Config, *logging.Logger, error)

func NewDefaultConfig

func NewDefaultConfig() Config

func ReadConfigAndWatch

func ReadConfigAndWatch(configFilePath string, logger *logging.Logger) (*Config, error)

func StoreDefaultConfigInFile

func StoreDefaultConfigInFile(filePath string) (*Config, error)

type DataNodeConfig added in v0.2.0

type DataNodeConfig struct {
	Name    string `long:"Name"`
	REST    string `long:"REST"`
	GraphQL string `long:"GraphQL"`
	GRPC    string `long:"GRPC"`
}

type EthereumConfig

type EthereumConfig struct {
	RPCEndpoint      string `long:"RPCEndpoint"`
	EtherscanURL     string `long:"EtherscanURL"`
	EtherscanApiKey  string `long:"EtherscanApiKey"`
	AssetPoolAddress string `long:"AssetPoolAddress"`
}

type LocalNodeConfig added in v0.2.0

type LocalNodeConfig struct {
	CometURL     string `long:"CometURL"`
	DataNodeREST string `long:"DataNodeREST"`
}

type PrometheusConfig added in v0.2.0

type PrometheusConfig struct {
	Port    int    `long:"port"`
	Path    string `long:"path"`
	Enabled bool   `long:"enabled"`
}

type SQLStoreConfig

type SQLStoreConfig struct {
	Host     string `long:"host"`
	Port     int    `long:"port"`
	Username string `long:"username"`
	Password string `long:"password"`
	Database string `long:"database"`
}

func (*SQLStoreConfig) GetConnectionConfig

func (c *SQLStoreConfig) GetConnectionConfig() sqlstore.ConnectionConfig

Jump to

Keyboard shortcuts

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