Documentation ¶
Overview ¶
Package crdbx provides shared functions used to initialize connections with a cockroachdb instance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustViperFlags ¶
MustViperFlags returns the cobra flags and viper config to prevent code duplication and help provide consistent flags across the applications
Types ¶
type Config ¶
type Config struct { Name string `mapstructure:"name"` Host string `mapstructure:"host"` User string `mapstructure:"user"` Password string `mapstructure:"password"` Params string `mapstructure:"params"` URI string `mapstructure:"uri"` Connections struct { MaxOpen int `mapstructure:"max_open"` MaxIdle int `mapstructure:"max_idle"` MaxLifetime time.Duration `mapstructure:"max_lifetime"` } }
Config is used to configure a new cockroachdb connection
func ConfigFromArgs ¶ added in v0.0.2
ConfigFromArgs returns a crdbx.Config from the provided viper-provided flags.
Click to show internal directories.
Click to hide internal directories.