config

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 12 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 {
	Addr             string `env:"GRPC_ADDR"            envDefault:"grpc.buenavista.wardenprotocol.org:443" mapstructure:"GRPC_ADDR"`
	EnvFile          string `env:"ENV_FILE"             envDefault:""`
	Port             string `env:"PORT"                 envDefault:"8081"                                   mapstructure:"PORT"`
	TLS              bool   `env:"GRPC_TLS_ENABLED"     envDefault:"true"                                   mapstructure:"GRPC_TLS_ENABLED"`
	Timeout          int    `env:"GRPC_TIMEOUT_SECONDS" envDefault:"45"                                     mapstructure:"GRPC_TIMEOUT_SECONDS"`
	TTL              int    `env:"TTL"                  envDefault:"60"                                     mapstructure:"TTL"`
	ChainID          string `env:"CHAIN_ID"             envDefault:"buenavista-1"                           mapstructure:"CHAIN_ID"`
	WardenMetrics    bool   `env:"WARDEN_METRICS"       envDefault:"true"                                   mapstructure:"WARDEN_METRICS"`
	ValidatorMetrics bool   `env:"VALIDATOR_METRICS"    envDefault:"true"                                   mapstructure:"VALIDATOR_METRICS"`
	WalletAddresses  string `env:"WALLET_ADDRESSES"     envDefault:""                                       mapstructure:"WALLET_ADDRESSES"`
	Denom            string `env:"DENOM"                envDefault:"uward"                                  mapstructure:"DENOM"`
	WarpMetrics      bool   `env:"WARP_METRICS"         envDefault:"true"                                   mapstructure:"WARP_METRICS"`
	WarpDB           string `env:"WARP_DATABASE"        envDefault:""                                       mapstructure:"WARP_DATABASE"`
	WarpDBUser       string `env:"WARP_DATABASE_USER"   envDefault:""                                       mapstructure:"WARP_DATABASE_USER"`
	WarpDBPass       string `env:"WARP_DATABASE_PASS"   envDefault:""                                       mapstructure:"WARP_DATABASE_PASS"`
	WarpDBHost       string `env:"WARP_DATABASE_HOST"   envDefault:""                                       mapstructure:"WARP_DATABASE_HOST"`
}

func LoadConfig added in v1.7.0

func LoadConfig() (Config, error)

func (Config) GRPCConn

func (c Config) GRPCConn() (*grpc.ClientConn, error)

Jump to

Keyboard shortcuts

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