state

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltdbStore

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

func NewBoltdbStore

func NewBoltdbStore(path string) (*BoltdbStore, error)

func NewBoltdbStoreWithDB

func NewBoltdbStoreWithDB(db *bolt.DB) (*BoltdbStore, error)

func NewInmemStore

func NewInmemStore(t *testing.T) *BoltdbStore

func (*BoltdbStore) Close

func (s *BoltdbStore) Close() error

func (*BoltdbStore) DeleteAllocationBucket

func (s *BoltdbStore) DeleteAllocationBucket(allocID string) error

func (*BoltdbStore) GetAllocations

func (s *BoltdbStore) GetAllocations() ([]*proto.Allocation, error)

func (*BoltdbStore) GetTaskState

func (s *BoltdbStore) GetTaskState(allocID, taskName string) (*proto.TaskState, *proto.TaskHandle, error)

func (*BoltdbStore) PutAllocation

func (s *BoltdbStore) PutAllocation(a *proto.Allocation) error

func (*BoltdbStore) PutTaskLocalState

func (s *BoltdbStore) PutTaskLocalState(allocID string, taskName string, handle *proto.TaskHandle) error

func (*BoltdbStore) PutTaskState

func (s *BoltdbStore) PutTaskState(allocID string, taskName string, state *proto.TaskState) error

type State

type State interface {
	PutTaskLocalState(allocID string, taskName string, handle *proto.TaskHandle) error
	GetTaskState(allocID, taskName string) (*proto.TaskState, *proto.TaskHandle, error)
	PutTaskState(allocID string, taskName string, state *proto.TaskState) error
	GetAllocations() ([]*proto.Allocation, error)
	PutAllocation(a *proto.Allocation) error
	DeleteAllocationBucket(allocId string) error
	Close() error
}

Jump to

Keyboard shortcuts

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