Documentation
¶
Overview ¶
Package config enables loading and utilizing configuration options for different blockchain networks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterConfig ¶
type AdapterConfig struct {
Requests ResourcesConfig `mapstructure:"requests" yaml:"requests"`
Limits ResourcesConfig `mapstructure:"limits" yaml:"limits"`
}
AdapterConfig holds the configuration for the adapter pods to be deployed
type AppConfig ¶
type AppConfig struct {
Chainlink ChainlinkConfig `mapstructure:"chainlink" yaml:"chainlink"`
Geth GethConfig `mapstructure:"geth" yaml:"geth"`
Adapter AdapterConfig `mapstructure:"adapter" yaml:"adapter"`
}
AppConfig holds all the configuration for the core apps that are deployed for testing
type ChainlinkConfig ¶
type ChainlinkConfig struct {
Image string `mapstructure:"image" yaml:"image"`
Version string `mapstructure:"version" yaml:"version"`
NodeRequests ResourcesConfig `mapstructure:"nodeRequests" yaml:"nodeRequests"`
NodeLimits ResourcesConfig `mapstructure:"nodeLimits" yaml:"nodeLimits"`
PostgresRequests ResourcesConfig `mapstructure:"postgresRequests" yaml:"postgresRequests"`
PostgresLimits ResourcesConfig `mapstructure:"postgresLimits" yaml:"postgresLimits"`
}
ChainlinkConfig holds the configuration for the chainlink nodes to be deployed
type Config ¶
type Config struct {
Logging *LoggingConfig `mapstructure:"logging" yaml:"logging"`
Network string `mapstructure:"network" yaml:"network"`
Networks map[string]*NetworkConfig `mapstructure:"networks" yaml:"networks"`
Retry *RetryConfig `mapstructure:"retry" yaml:"retry"`
Apps AppConfig `mapstructure:"apps" yaml:"apps"`
Kubernetes KubernetesConfig `mapstructure:"kubernetes" yaml:"kubernetes"`
KeepEnvironments string `mapstructure:"keep_environments" yaml:"keep_environments"`
Prometheus *PrometheusConfig `mapstructure:"prometheus" yaml:"prometheus"`
DefaultKeyStore string
ConfigFileLocation string
}
Config is the overall config for the framework, holding configurations for supported networks
func NewConfig ¶
NewConfig creates a new configuration instance via viper from env vars, config file, or a secret store
func (*Config) GetNetworkConfig ¶
func (c *Config) GetNetworkConfig(name string) (*NetworkConfig, error)
GetNetworkConfig finds a specified network config based on its name
type ConfigurationType ¶
type ConfigurationType string
ConfigurationType refers to the different ways that configurations can be set
const ( LocalConfig ConfigurationType = "local" SecretConfig ConfigurationType = "secret" )
type ExplorerMockConfig ¶
type ExplorerMockConfig struct {
URL string
}
type GethConfig ¶
type GethConfig struct {
Requests ResourcesConfig `mapstructure:"requests" yaml:"requests"`
Limits ResourcesConfig `mapstructure:"limits" yaml:"limits"`
}
GethConfig holds the configuration for the geth pods to be deployed
type KubernetesConfig ¶
type KubernetesConfig struct {
QPS float32 `mapstructure:"qps" yaml:"qps"`
Burst int `mapstructure:"burst" yaml:"burst"`
DeploymentTimeout time.Duration `mapstructure:"deployment_timeout" yaml:"deployment_timeout"`
}
KubernetesConfig holds the configuration for how the framework interacts with the k8s cluster
type LocalStore ¶
type LocalStore struct {
RawKeys []string
}
LocalStore retrieves keys defined in a config.yml file, or from environment variables
func (*LocalStore) Fetch ¶
func (l *LocalStore) Fetch() ([]string, error)
Fetch private keys from local environment variables or a config file
type LoggingConfig ¶
type LoggingConfig struct {
Level int8 `mapstructure:"level" yaml:"logging"`
}
type NetworkConfig ¶
type NetworkConfig struct {
Name string `mapstructure:"name" yaml:"name"`
URL string `mapstructure:"url" yaml:"url"`
ChainID int64 `mapstructure:"chain_id" yaml:"chain_id"`
Type string `mapstructure:"type" yaml:"type"`
SecretPrivateKeys bool `mapstructure:"secret_private_keys" yaml:"secret_private_keys"`
NamespaceForSecret string `mapstructure:"namespace_for_secret" yaml:"namespace_for_secret"`
PrivateKeys []string `mapstructure:"private_keys" yaml:"private_keys"`
TransactionLimit uint64 `mapstructure:"transaction_limit" yaml:"transaction_limit"`
Timeout time.Duration `mapstructure:"transaction_timeout" yaml:"transaction_timeout"`
LinkTokenAddress string `mapstructure:"link_token_address" yaml:"link_token_address"`
MinimumConfirmations int `mapstructure:"minimum_confirmations" yaml:"minimum_confirmations"`
GasEstimationBuffer uint64 `mapstructure:"gas_estimation_buffer" yaml:"gas_estimation_buffer"`
BlockGasLimit uint64 `mapstructure:"block_gas_limit" yaml:"block_gas_limit"`
PrivateKeyStore PrivateKeyStore
}
NetworkConfig holds the basic values that identify a blockchain network and contains private keys on the network
type PrivateKeyStore ¶
PrivateKeyStore enables access, through a variety of methods, to private keys for use in blockchain networks
type PrometheusConfig ¶
type PrometheusConfig struct {
URL string `mapstructure:"url" yaml:"url"`
}
type ResourcesConfig ¶
type ResourcesConfig struct {
Memory string `mapstructure:"memory" yaml:"memory"`
Cpu string `mapstructure:"cpu" yaml:"cpu"`
}
ResourcesConfig hols the resource usage configuration for a pod