setup

package
v0.0.0-...-453881e Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: MIT Imports: 11 Imported by: 4

Documentation

Overview

Package setup helps initialize the database and all queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(connector db.Connector, dbConns int) error

DB initializes a connection to the database, and prepares queries on all models.

func GetActiveQueries

func GetActiveQueries() (count int64, err error)

func MeasureActiveQueries

func MeasureActiveQueries(interval time.Duration)

TODO all of these should use a different database connection than the server or the worker, to avoid contention.

func MeasureInProgressJobs

func MeasureInProgressJobs(interval time.Duration)

func MeasureQueueDepth

func MeasureQueueDepth(interval time.Duration)

func PrepareAll

func PrepareAll() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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