config

package
v0.52.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 1,034

Documentation

Index

Constants

View Source
const (
	DefaultClientConfigTemplate = `` /* 1237-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CreateClientConfig added in v0.50.0

func CreateClientConfig(ctx client.Context, customClientTemplate string, customConfig interface{}) (client.Context, error)

CreateClientConfig reads the client.toml file and returns a new populated client.Context If the client.toml file does not exist, it creates one with default values. It takes a customClientTemplate and customConfig as input that can be used to overwrite the default config and enhance the client.toml file. The custom template/config must be both provided or be "" and nil.

func ReadFromClientConfig

func ReadFromClientConfig(ctx client.Context) (client.Context, error)

ReadFromClientConfig reads values from client.toml file and updates them in client.Context It uses CreateClientConfig internally with no custom template and custom config. Deprecated: use CreateClientConfig instead.

Types

type ClientConfig

type ClientConfig Config

ClientConfig is an alias for Config for backward compatibility Deprecated: use Config instead which avoid name stuttering

type Config added in v0.50.0

type Config struct {
	ChainID               string     `mapstructure:"chain-id" json:"chain-id"`
	KeyringBackend        string     `mapstructure:"keyring-backend" json:"keyring-backend"`
	KeyringDefaultKeyName string     `mapstructure:"keyring-default-keyname" json:"keyring-default-keyname"`
	Output                string     `mapstructure:"output" json:"output"`
	Node                  string     `mapstructure:"node" json:"node"`
	BroadcastMode         string     `mapstructure:"broadcast-mode" json:"broadcast-mode"`
	GRPC                  GRPCConfig `mapstructure:",squash"`
}

func DefaultConfig added in v0.50.0

func DefaultConfig() *Config

DefaultConfig returns default config for the client.toml

type GRPCConfig

type GRPCConfig struct {
	Address  string `mapstructure:"grpc-address"  json:"grpc-address"`
	Insecure bool   `mapstructure:"grpc-insecure"  json:"grpc-insecure"`
}

GRPCConfig holds the gRPC client configuration.

Jump to

Keyboard shortcuts

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