Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvDbConnStr = "DB_CONN_STR" EnvRedisHost = "REDIS_HOST" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
func NewDatabase ¶
NewDatabase establishes a database connection with the given Vault credentials
func (*Database) Reconnect ¶
Reconnect will be called periodically to refresh the database connection since the dynamic credentials expire after some time, it will:
- construct a connection string using the given credentials
- establish a database connection
- close & replace the existing connection with the new one behind a mutex
Click to show internal directories.
Click to hide internal directories.