configuration

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAppConfig added in v0.2.0

func SetAppConfig(config Config)

Types

type CASPConfig added in v0.2.0

type CASPConfig struct {
	URL                     string
	VaultID                 string
	TendermintPublicKey     string
	EthereumPublicKey       string
	SignatureWaitTime       time.Duration
	APIToken                string
	AllowConcurrentKeyUsage bool
}

func NewCASPConfig added in v0.2.0

func NewCASPConfig() CASPConfig

type Config

type Config struct {
	Kafka      KafkaConfig
	Tendermint TendermintConfig
	Ethereum   EthereumConfig
	CASP       CASPConfig

	RPCEndpoint string
	// contains filtered or unexported fields
}

func GetAppConfig added in v0.2.0

func GetAppConfig() *Config

func NewConfig

func NewConfig() Config

func (Config) Validate added in v0.2.0

func (config Config) Validate() error

Validate :panics if config is not valid

type EthereumConfig

type EthereumConfig struct {
	EthereumEndPoint string
	GasLimit         uint64
}

func NewEthereumConfig

func NewEthereumConfig() EthereumConfig

func (EthereumConfig) Validate added in v0.2.0

func (config EthereumConfig) Validate() error

Validate :panics if config is not valid

type KafkaConfig

type KafkaConfig struct {
	// Brokers: List of brokers to run kafka cluster
	Brokers      []string
	TopicDetail  sarama.TopicDetail
	ToEth        TopicConsumer
	ToTendermint TopicConsumer
	// Time for each unbonding transactions 3 days => input nano-seconds 259200000000000
	EthUnbondCycleTime time.Duration
}

func NewKafkaConfig

func NewKafkaConfig() KafkaConfig

func (KafkaConfig) Validate added in v0.2.0

func (config KafkaConfig) Validate() error

Validate :panics if config is not valid

type TendermintConfig

type TendermintConfig struct {
	PStakeAddress string
	PStakeDenom   string
	BroadcastMode string
}

func NewTendermintConfig

func NewTendermintConfig() TendermintConfig

func (TendermintConfig) Validate added in v0.2.0

func (config TendermintConfig) Validate() error

Validate :panics if config is not valid

type TopicConsumer

type TopicConsumer struct {
	MinBatchSize int
	MaxBatchSize int
	Ticker       time.Duration
}

Jump to

Keyboard shortcuts

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