pricefeeder

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagConfigPath     = "pricefeeder.config_path"
	FlagChainConfig    = "pricefeeder.chain_config"
	FlagLogLevel       = "pricefeeder.log_level"
	FlagOracleTickTime = "pricefeeder.oracle_tick_time"
)
View Source
const (
	DefaultConfigTemplate = `` /* 382-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	ConfigPath     string        `mapstructure:"config_path"`
	ChainConfig    bool          `mapstructure:"chain_config"`
	LogLevel       string        `mapstructure:"log_level"`
	OracleTickTime time.Duration `mapstructure:"oracle_tick_time"`
}

AppConfig defines the app configuration for the price feeder that must be set in the app.toml file.

func ReadConfigFromAppOpts

func ReadConfigFromAppOpts(opts servertypes.AppOptions) (AppConfig, error)

ReadConfigFromAppOpts reads the config parameters from the AppOptions and returns the config.

func (*AppConfig) ValidateBasic

func (c *AppConfig) ValidateBasic() error

ValidateBasic performs basic validation of the price feeder app config.

type PriceFeeder

type PriceFeeder struct {
	Oracle *oracle.Oracle
}

func (*PriceFeeder) Start

func (pf *PriceFeeder) Start(oracleParams types.Params, appConfig AppConfig) error

Jump to

Keyboard shortcuts

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