Documentation ¶
Overview ¶
Package setup helps initialize the database and all queries.
Index ¶
- func DB(ctx context.Context, connector db.Connector, dbConns int) error
- func GetActiveQueries(ctx context.Context) (count int64, err error)
- func MeasureActiveQueries(ctx context.Context, interval time.Duration)
- func MeasureInProgressJobs(ctx context.Context, interval time.Duration)
- func MeasureQueueDepth(ctx context.Context, interval time.Duration)
- func PrepareAll(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DB ¶
DB initializes a connection to the database, and prepares queries on all models. If connector is nil, db.DefaultConnection will be used.
func MeasureActiveQueries ¶
TODO all of these should use a different database connection than the server or the worker, to avoid contention.
func MeasureInProgressJobs ¶
func PrepareAll ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.