config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MonitoringDbSchema = "metrics"

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockExplorerConfig added in v0.3.0

type BlockExplorerConfig struct {
	Name        string `` /* 146-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 CoreConfig added in v0.5.0

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

type DataNodeConfig added in v0.2.0

type DataNodeConfig struct {
	Name        string `` /* 267-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 EthereumNodeConfig added in v0.7.0

type EthereumNodeConfig struct {
	RPCEndpoint                 string `long:"RPCEndpoint"                  comment:"URL of the node"`
	VegaCollateralBridgeAddress string `long:"VegaCollateralBridgeAddress"  comment:"HEX address of CollateralBridge for Vega network"`
}

type LocalNodeConfig added in v0.2.0

type LocalNodeConfig struct {
	Enabled     bool   `long:"Enabled"`
	Name        string `` /* 146-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 {
	Core          []CoreConfig          `group:"Core"          namespace:"core"`
	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"`
	EthereumNode  []EthereumNodeConfig  `group:"EthereumNode"  namespace:"ethereumnode"`

	Level string `long:"Level"`
}

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