config

package
v0.0.0-...-d87fed3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigPath = "./config.toml"
)

Functions

This section is empty.

Types

type Config

type Config struct {
	RPC    *RPCConfig    `toml:"rpc"`
	GRPC   *GRPCConfig   `toml:"grpc"`
	LCD    *LCDConfig    `toml:"lcd"`
	Custom *CustomConfig `toml:"custom"`
}

Config defines all necessary configuration parameters.

func NewConfig

func NewConfig(rpc *RPCConfig, gRPC *GRPCConfig, lcd *LCDConfig) *Config

NewConfig builds a new Config instance.

func ParseString

func ParseString(configData []byte) (*Config, error)

ParseString attempts to read and parse config from the given string bytes. An error reading or parsing the config results in a panic.

func Read

func Read(configPath string) (*Config, error)

SetupConfig takes the path to a configuration file and returns the properly parsed configuration.

type CustomConfig

type CustomConfig struct {
	Mnemonic  string `toml:"mnemonic"`
	GasLimit  int64  `toml:"gas_limit"`
	FeeDenom  string `toml:"fee_denom"`
	FeeAmount int64  `toml:"fee_amount"`
	Memo      string `toml:"memo"`
}

CustomConfig contains custom configuration for stress testing.

type GRPCConfig

type GRPCConfig struct {
	Address string `toml:"address"`
}

GRPCConfig contains the configuration of the gRPC endpoint.

type LCDConfig

type LCDConfig struct {
	Address string `toml:"address"`
}

LCDConfig contains the configuration of the REST server endpoint.

type RPCConfig

type RPCConfig struct {
	Address string `toml:"address"`
}

RPCConfig contains the configuration of the RPC endpoint.

Jump to

Keyboard shortcuts

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