rotationmanager

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB manages rotations in Postgres.

func NewDB

func NewDB(ctx context.Context, db *sql.DB) (*DB, error)

NewDB will create a new DB, preparing all statements necessary.

func (*DB) Name

func (db *DB) Name() string

Name returns the name of the module.

func (*DB) UpdateAll

func (db *DB) UpdateAll(ctx context.Context) error

UpdateAll will update and cleanup the rotation state for all rotations.

func (*DB) UpdateOneRotation

func (db *DB) UpdateOneRotation(ctx context.Context, rotID string) error

UpdateOneRotation will update and cleanup the rotation state for the given rotation.

Jump to

Keyboard shortcuts

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