config

package
v2.10.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ChainID               string     `mapstructure:"chain-id" toml:"chain-id" comment:"The chain ID of the blockchain network"`
	KeyringBackend        string     `mapstructure:"keyring-backend" toml:"keyring-backend" comment:"The keyring backend to use (os|file|kwallet|pass|test|memory)"`
	KeyringDefaultKeyName string     `` /* 132-byte string literal not displayed */
	Output                string     `mapstructure:"output" toml:"output" comment:"The output format for queries (text|json)"`
	Node                  string     `mapstructure:"node" toml:"node" comment:"The RPC endpoint URL for the node to connect to"`
	BroadcastMode         string     `` /* 126-byte string literal not displayed */
	GRPC                  GRPCConfig `mapstructure:",squash" comment:"The gRPC client configuration"`
}

func CreateClientConfig

func CreateClientConfig(homeDir, chainID string, v *viper.Viper) (*Config, error)

CreateClientConfig creates a new client configuration or reads an existing one.

func CreateClientConfigFromFlags

func CreateClientConfigFromFlags(set *pflag.FlagSet) (*Config, error)

CreateClientConfigFromFlags creates a client configuration from command-line flags.

func DefaultConfig

func DefaultConfig() *Config

type GRPCConfig

type GRPCConfig struct {
	Address  string `mapstructure:"grpc-address"  toml:"grpc-address" comment:"The gRPC server address to connect to"`
	Insecure bool   `mapstructure:"grpc-insecure"  toml:"grpc-insecure" comment:"Allow gRPC over insecure connections"`
}

GRPCConfig holds the gRPC client configuration.

Jump to

Keyboard shortcuts

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