config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustGetSupportChainPath

func MustGetSupportChainPath(configName string) string

GetSupportChain WorkingDirectory in anywhere

Types

type Asset

type Asset struct {
	Denom   string `yaml:"denom"`
	Decimal int    `yaml:"decimal"`
}

type ChainConfig

type ChainConfig struct {
	DisplayName       string         `yaml:"display_name"`
	ChainID           string         `yaml:"chain_id"`
	TrackingAddresses []string       `yaml:"tracking_addresses,omitempty"`
	Nodes             []NodeEndPoint `yaml:"nodes"`
	ProviderNodes     []NodeEndPoint `yaml:"provider_nodes"`
}

each chain

type ChainDetail

type ChainDetail struct {
	ChainName    string   `yaml:"chain_name"`
	ProtocolType string   `yaml:"protocol_type"`
	Mainnet      bool     `yaml:"mainnet"`
	Consumer     bool     `yaml:"consumer"`
	Packages     []string `yaml:"packages"`
	SupportAsset Asset    `yaml:"support_asset"`
}

type MonitoringConfig

type MonitoringConfig struct {
	Monikers     []string      `yaml:"monikers"`
	ChainConfigs []ChainConfig `yaml:"chains"`
}

root config

func GetConfig

func GetConfig(path string) (*MonitoringConfig, error)

TODO: ignore failed chains

type NodeEndPoint

type NodeEndPoint struct {
	RPC  string `yaml:"rpc"`
	API  string `yaml:"api"`
	GRPC string `yaml:"grpc"`
}

each chain's available node list

type SupportChains

type SupportChains struct {
	Chains map[string]ChainDetail `yaml:",inline"`
}

func GetSupportChainConfig

func GetSupportChainConfig() (*SupportChains, error)

Jump to

Keyboard shortcuts

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