storage

package
v0.0.0-...-30c4d99 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signal

type Signal struct {
	Name       string `xorm:"pk"`
	Notifier   string
	NextSignal time.Time
	Meta       map[string]string
}

Signal represents stored signal information

type Storage

type Storage interface {
	Load() ([]Signal, error)
	Save(Signal) error
	Remove(Signal) error

	io.Closer
}

Storage interface is used to persist Nanny data in between restarts or outages.

func NewSQLiteDB

func NewSQLiteDB(dsn string) (Storage, error)

NewSQLiteDB creates new Storage using sqlite backend.

Jump to

Keyboard shortcuts

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