database

package
v0.0.0-...-dd7dce4 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB       *sql.DB
	ARRTable = os.Getenv("ARRTable")
	ARTable  = os.Getenv("ARTable")

	// variables that are settable from outside routines:
	// SetMaxIdleConns maximum number of idle connections to DB
	SetMaxIdleConns = 4

	// SetMaxOpenConns maximum number of open connections to DB
	SetMaxOpenConns = 16

	AppName string

	DBreporting *runner.DB

	SessionReady = false
	Sess         *session.Session
	SvcSNS       *sns.SNS
	SvcLambda    *lambda.Lambda

	SnsRegion    = fmRegionUSEastOne
	LambdaRegion = fmRegionUSEastOne
	DreTable     = "dmarc_reporting_entries"
	RecordChunk  = 10000
	AwsConfig    = aws.Config{
		Credentials: credentials.NewChainCredentials(
			[]credentials.Provider{
				&credentials.EnvProvider{},
				&ec2rolecreds.EC2RoleProvider{
					ExpiryWindow: 5 * time.Minute,
				},
			},
		),
	}
)

Functions

func GetReportingDB

func GetReportingDB() *runner.DB

func GetTheRunner

func GetTheRunner(prefix string) (theRunner *runner.DB)

func InitDBRunner

func InitDBRunner(prefix string) (db *runner.DB)

func InitSQLDB

func InitSQLDB(prefix string) (sqlDB *sql.DB)

InitSQLDB is a non-runner DB init for migrating code away from runner.DB

Types

type DBConnectInfo

type DBConnectInfo struct {
	// contains filtered or unexported fields
}

type DBHandle

type DBHandle struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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