config

package
v0.0.0-...-82415a5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeEncodingConfig

func MakeEncodingConfig(managers []module.BasicManager) func() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig to properly handle all the messages

func Parser

func Parser(fileContents []byte) (juno.Config, error)

Parser represents the method that should be used to parse a configuration

Types

type Config

type Config struct {
	juno.Config
	PricefeedConfig    *PricefeedConfig
	DistributionConfig *DistributionConfig
}

Config contains the data about the BDJuno configuration

func NewConfig

func NewConfig(junoConfig juno.Config, pricefeedConfig *PricefeedConfig, distributionConfig *DistributionConfig) *Config

NewConfig returns a new Config instance

func (*Config) GetCosmosConfig

func (c *Config) GetCosmosConfig() juno.CosmosConfig

GetCosmosConfig implements juno.Config

func (*Config) GetDatabaseConfig

func (c *Config) GetDatabaseConfig() juno.DatabaseConfig

GetDatabaseConfig implements juno.Config

func (*Config) GetDistributionConfig

func (c *Config) GetDistributionConfig() *DistributionConfig

GetDistributionConfig return current distribution frequency

func (*Config) GetGrpcConfig

func (c *Config) GetGrpcConfig() juno.GrpcConfig

GetGrpcConfig implements juno.Config

func (*Config) GetLoggingConfig

func (c *Config) GetLoggingConfig() juno.LoggingConfig

GetLoggingConfig implements juno.Config

func (*Config) GetParsingConfig

func (c *Config) GetParsingConfig() juno.ParsingConfig

GetParsingConfig implements juno.Config

func (*Config) GetPricefeedConfig

func (c *Config) GetPricefeedConfig() *PricefeedConfig

GetPricefeedConfig return the current PricefeedConfig

func (*Config) GetPruningConfig

func (c *Config) GetPruningConfig() juno.PruningConfig

GetPruningConfig implements juno.Config

func (*Config) GetRPCConfig

func (c *Config) GetRPCConfig() juno.RPCConfig

GetRPCConfig implements juno.Config

func (*Config) GetTelemetryConfig

func (c *Config) GetTelemetryConfig() juno.TelemetryConfig

GetTelemetryConfig implements juno.Config

type DistributionConfig

type DistributionConfig struct {
	DistributionFrequency int64 `toml:"distribution_frequency"`
}

DistributionConfig contains the configuration about distribution frequency

func DefaultDistributionConfig

func DefaultDistributionConfig() *DistributionConfig

DefaultDistributionConfig returns the default distribution config

func (*DistributionConfig) GetDistributionFrequency

func (b *DistributionConfig) GetDistributionFrequency() int64

GetDistributionFrequency returns distribution frequency int64 value

type PricefeedConfig

type PricefeedConfig struct {
	Tokens []types.Token `toml:"tokens"`
}

PricefeedConfig contains the configuration about the pricefeed module

func (*PricefeedConfig) GetTokens

func (p *PricefeedConfig) GetTokens() []types.Token

GetTokens returns the list of tokens for which to get the prices

Jump to

Keyboard shortcuts

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