db

package
v0.0.0-...-4780336 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	URI              string
	DBNamePrefix     string
	Timeout          int
	NoCursorTimeout  bool
	MaxPoolSize      uint64
	IdleConnTimeout  int
	InstanceIDs      []string
	RunIndexCreation bool
}

func DBConfigFromYamlObj

func DBConfigFromYamlObj(yamlObj DBConfigYaml, instanceIDs []string) DBConfig

func ReadDBConfigFromEnv

func ReadDBConfigFromEnv(
	dbLabel string,
	connectionStrEnv string,
	usernameEnv string,
	passwordEnv string,
	connectionPrefixEnv string,
	timeoutEnv string,
	idleConnTimeoutEnv string,
	maxPoolSizeEnv string,
	useNoCursorTimeoutEnv string,
	dbNamePrefixEnv string,
	instanceIDs []string,

) DBConfig

type DBConfigYaml

type DBConfigYaml struct {
	ConnectionStr      string `yaml:"connection_str"`
	Username           string `yaml:"username"`
	Password           string `yaml:"password"`
	ConnectionPrefix   string `yaml:"connection_prefix"`
	Timeout            int    `yaml:"timeout"`
	IdleConnTimeout    int    `yaml:"idle_conn_timeout"`
	MaxPoolSize        int    `yaml:"max_pool_size"`
	UseNoCursorTimeout bool   `yaml:"use_no_cursor_timeout"`
	DBNamePrefix       string `yaml:"db_name_prefix"`
	RunIndexCreation   bool   `yaml:"run_index_creation"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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