null

package
v2.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MPL-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() iface.Backend

New creates NullBackend instance

Types

type Backend

type Backend struct {
	common.Backend
	// contains filtered or unexported fields
}

Backend represents an "null" result backend

func (*Backend) GetState

func (b *Backend) GetState(taskUUID string) (*tasks.TaskState, error)

GetState returns the latest task state

func (*Backend) GroupCompleted

func (b *Backend) GroupCompleted(groupUUID string, groupTaskCount int) (bool, error)

GroupCompleted returns true (always)

func (*Backend) GroupTaskStates

func (b *Backend) GroupTaskStates(groupUUID string, groupTaskCount int) ([]*tasks.TaskState, error)

GroupTaskStates returns null states of all tasks in the group

func (*Backend) InitGroup

func (b *Backend) InitGroup(groupUUID string, taskUUIDs []string) error

InitGroup creates and saves a group meta data object

func (*Backend) PurgeGroupMeta

func (b *Backend) PurgeGroupMeta(groupUUID string) error

PurgeGroupMeta deletes stored group meta data

func (*Backend) PurgeState

func (b *Backend) PurgeState(taskUUID string) error

PurgeState deletes stored task state

func (*Backend) SetStateFailure

func (b *Backend) SetStateFailure(signature *tasks.Signature, err string) error

SetStateFailure updates task state to FAILURE

func (*Backend) SetStatePending

func (b *Backend) SetStatePending(signature *tasks.Signature) error

SetStatePending updates task state to PENDING

func (*Backend) SetStateReceived

func (b *Backend) SetStateReceived(signature *tasks.Signature) error

SetStateReceived updates task state to RECEIVED

func (*Backend) SetStateRetry

func (b *Backend) SetStateRetry(signature *tasks.Signature) error

SetStateRetry updates task state to RETRY

func (*Backend) SetStateStarted

func (b *Backend) SetStateStarted(signature *tasks.Signature) error

SetStateStarted updates task state to STARTED

func (*Backend) SetStateSuccess

func (b *Backend) SetStateSuccess(signature *tasks.Signature, results []*tasks.TaskResult) error

SetStateSuccess updates task state to SUCCESS

func (*Backend) TriggerChord

func (b *Backend) TriggerChord(groupUUID string) (bool, error)

TriggerChord returns true (always)

type ErrGroupNotFound

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

ErrGroupNotFound ...

func NewErrGroupNotFound

func NewErrGroupNotFound(groupUUID string) ErrGroupNotFound

NewErrGroupNotFound returns new instance of ErrGroupNotFound

func (ErrGroupNotFound) Error

func (e ErrGroupNotFound) Error() string

Error implements error interface

type ErrTasknotFound

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

ErrTasknotFound ...

func NewErrTasknotFound

func NewErrTasknotFound(taskUUID string) ErrTasknotFound

NewErrTasknotFound returns new instance of ErrTasknotFound

func (ErrTasknotFound) Error

func (e ErrTasknotFound) Error() string

Error implements error interface

Jump to

Keyboard shortcuts

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