database

package
v0.0.0-...-1730ba2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package database implements an storage using a database as backend

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is a storage that persists the system state into an underlying RDBMS

func WithDB

func WithDB(db *sql.DB) *Database

WithDB creates a new database storage object connecting to the database of type 'stype' at the given url

func (*Database) Current

func (d *Database) Current() (qaclana.State, error)

Current gets the currently set system state

func (*Database) Notifier

func (d *Database) Notifier() (<-chan qaclana.State, error)

Notifier yields a channel used to notify state changes

func (*Database) Store

func (d *Database) Store(ctx context.Context, s qaclana.State) error

Store a new system state into the database

Jump to

Keyboard shortcuts

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