Documentation ¶
Index ¶
Constants ¶
const CustomPostgres string = "custompostgres"
CustomPostgres is used to set the driverName to the custom postgres driver
Variables ¶
This section is empty.
Functions ¶
func EnableIAM ¶
func EnableIAM(host string, port string, region string, user string, passTemplate string, creds aws.CredentialsProvider, rus RDSUtilService, waitDuration time.Duration, logger *zap.Logger, shouldQuitChan chan bool) error
EnableIAM enables the use of IAM and pulls first credential set as a sanity check Note: This method is intended to be non-blocking, so please add any changes to the goroutine Note: Ensure the timer is on an interval lower than 15 minutes (AWS RDS IAM auth limit)
Types ¶
type RDSPostgresDriver ¶
type RDSPostgresDriver struct { }
RDSPostgresDriver implemements driver.DriverContext
func (*RDSPostgresDriver) OpenConnector ¶
func (d *RDSPostgresDriver) OpenConnector(dsn string) (driver.Connector, error)
From go's documentation:
If a Driver implements DriverContext, then sql.DB will call OpenConnector to obtain a Connector and then invoke that Connector's Connect method to obtain each needed connection, instead of invoking the Driver's Open method for each connection. The two-step sequence allows drivers to parse the name just once and also provides access to per-Conn contexts.
Milmove wants this for IAM Authentication so we can update the auth token before connect