state

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConnector

type DBConnector interface {
	Connect() error
	SqlDB() *sql.DB
}

DBConnector provides an interface for working with the underlying DB implementations

type State

type State interface {
	Get(ctx context.Context, uuid string) (*tasks.AuthenticatedTask, error)
	GetAll(ctx context.Context) ([]*tasks.AuthenticatedTask, error)
	Update(ctx context.Context, uuid string, req *client.UpdateTaskRequest, recorder metrics.MetricsRecorder) (*tasks.AuthenticatedTask, error)
	NewStorageTask(ctx context.Context, storageTask *tasks.StorageTask) (*tasks.AuthenticatedTask, error)
	NewRetrievalTask(ctx context.Context, retrievalTask *tasks.RetrievalTask) (*tasks.AuthenticatedTask, error)
}

State provides an interface for presistence.

func NewStateDB

func NewStateDB(ctx context.Context, driver, conn string, identity crypto.PrivKey) (State, error)

NewStateDB creates a state instance with a given driver and identity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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