badger

package
v0.0.0-...-2e51320 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badger

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

Badger provides a task database based on the Badger embedded database.

func NewBadger

func NewBadger(conf config.Badger) (*Badger, error)

NewBadger creates a new database instance.

func (*Badger) Close

func (db *Badger) Close()

func (*Badger) GetTask

func (db *Badger) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)

GetTask gets a task, which describes a running task

func (*Badger) Init

func (db *Badger) Init() error

Init initializes the database.

func (*Badger) ListTasks

func (db *Badger) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)

ListTasks returns a list of tasks.

func (*Badger) WriteEvent

func (db *Badger) WriteEvent(ctx context.Context, req *events.Event) error

WriteEvent creates an event for the server to handle.

Jump to

Keyboard shortcuts

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