boltdb

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskDB

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

TaskDB is a boltdb implementation of the task database.

func NewTaskDB

func NewTaskDB(file string) (*TaskDB, error)

NewTaskDB returns a new instance of TaskDB.

func (*TaskDB) Clean

func (db *TaskDB) Clean() error

Clean is used to delete the tasks bucket

func (*TaskDB) Close

func (db *TaskDB) Close()

Close is used to Close the database

func (*TaskDB) DeleteTask added in v0.27.0

func (db *TaskDB) DeleteTask(id string) error

func (*TaskDB) ListNonTerminalTasks

func (db *TaskDB) ListNonTerminalTasks() ([]*eremetic.Task, error)

ListNonTerminalTasks returns a list of tasks that are not yet finished in one way or another.

func (*TaskDB) PutTask

func (db *TaskDB) PutTask(task *eremetic.Task) error

PutTask stores a requested task in the database

func (*TaskDB) ReadTask

func (db *TaskDB) ReadTask(id string) (eremetic.Task, error)

ReadTask fetches a task from the database and applies a mask to the MaskedEnvironment field

func (*TaskDB) ReadUnmaskedTask

func (db *TaskDB) ReadUnmaskedTask(id string) (eremetic.Task, error)

ReadUnmaskedTask fetches a task from the database and does not mask the MaskedEnvironment field. This function should be considered internal to Eremetic, and is used where we need to fetch a task and then re-save it to the database. It should not be returned to the API.

Jump to

Keyboard shortcuts

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