config

package
v0.0.0-...-539a74e Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 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"`
	IBCconfig *IBCconfig    `toml:"ibcconfig"`
}

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 {
	Mnemonics []string `toml:"mnemonics"`
	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 IBCchain

type IBCchain struct {
	ChainId           string `toml:"chainid"`
	Grpc              string `toml:"grpc"`
	Rpc               string `toml:"rpc"`
	DstAddress        string `toml:"dstaccount"`
	TokenDenom        string `toml:"tokendenom"`
	AccountHD         string `toml:"accounthd"`
	AccountaddrPrefix string `toml:"accountaddrprefix"`
}

type IBCconfig

type IBCconfig struct {
	Chains []IBCchain `toml:"chains"`
}

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