config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 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 BlockExplorerConfig added in v0.3.0

type BlockExplorerConfig struct {
	Name        string `` /* 139-byte string literal not displayed */
	REST        string `long:"REST"`
	Environment string `long:"Environment" comment:"one of: mainnet, mirror, devnet1, stagnet1, fairground"`
}

type CoingeckoConfig

type CoingeckoConfig struct {
	ApiURL   string            `long:"ApiURL"`
	AssetIds map[string]string `` /* 244-byte string literal not displayed */
}

type CometBFTConfig

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

type Config

type Config struct {
	Coingecko CoingeckoConfig `` /* 128-byte string literal not displayed */

	CometBFT CometBFTConfig `` /* 279-byte string literal not displayed */

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

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

	SQLStore SQLStoreConfig `` /* 169-byte string literal not displayed */

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

	Monitoring MonitoringConfig `group:"Monitoring" namespace:"monitoring" comment:"collected metrics are exposed on prometheus"`

	DataNodeDBExtension DataNodeDBExtensionConfig `` /* 141-byte string literal not displayed */
}

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 `` /* 260-byte string literal not displayed */
	REST        string `long:"REST"`
	GraphQL     string `long:"GraphQL"`
	GRPC        string `long:"GRPC"`
	Environment string `long:"Environment" comment:"one of: mainnet, mirror, devnet1, stagnet1, fairground"`
	Internal    bool   `long:"Internal" comment:"true if node run by Vega Team, otherwise false"`
}

type DataNodeDBExtensionConfig added in v0.3.0

type DataNodeDBExtensionConfig struct {
	Enabled bool `` /* 141-byte string literal not displayed */

	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"`
}

type EthereumConfig

type EthereumConfig struct {
	RPCEndpoint      string `long:"RPCEndpoint" comment:"used to get Asset Pool's asset balances"`
	EtherscanURL     string `long:"EtherscanURL"`
	EtherscanApiKey  string `long:"EtherscanApiKey"`
	AssetPoolAddress string `long:"AssetPoolAddress" comment:"used to get balances of asssets"`
}

type LocalNodeConfig added in v0.2.0

type LocalNodeConfig struct {
	Enabled     bool   `long:"Enabled"`
	Name        string `` /* 139-byte string literal not displayed */
	REST        string `long:"REST"`
	Environment string `long:"Environment" comment:"one of: mainnet, mirror, devnet1, stagnet1, fairground"`
	Type        string `long:"Type" comment:"One of: core, datanode, blockexplorer or leave empty"`
}

type MonitoringConfig added in v0.3.0

type MonitoringConfig struct {
	DataNode      []DataNodeConfig      `group:"DataNode" namespace:"datanode"`
	BlockExplorer []BlockExplorerConfig `group:"BlockExplorer" namespace:"blockexplorer"`
	LocalNode     LocalNodeConfig       `group:"LocalNode" namespace:"localhode" comment:"Useful for machine with closed ports"`
}

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