task

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

type BaseTask struct {
	Id             string
	Type           TaskType
	LogLabels      map[string]string
	FailureCount   int // Failed executions count
	FailureMessage string
	QueueName      string
	QueuedAt       time.Time

	Props map[string]interface{}

	Metadata interface{}
	// contains filtered or unexported fields
}

func NewTask

func NewTask(taskType TaskType) *BaseTask

func (*BaseTask) GetDescription

func (t *BaseTask) GetDescription() string

func (*BaseTask) GetFailureCount

func (t *BaseTask) GetFailureCount() int

func (*BaseTask) GetFailureMessage added in v1.4.12

func (t *BaseTask) GetFailureMessage() string

func (*BaseTask) GetId

func (t *BaseTask) GetId() string

func (*BaseTask) GetLogLabels

func (t *BaseTask) GetLogLabels() map[string]string

func (*BaseTask) GetMetadata

func (t *BaseTask) GetMetadata() interface{}

func (*BaseTask) GetProp

func (t *BaseTask) GetProp(key string) interface{}

func (*BaseTask) GetQueueName

func (t *BaseTask) GetQueueName() string

func (*BaseTask) GetQueuedAt

func (t *BaseTask) GetQueuedAt() time.Time

func (*BaseTask) GetType

func (t *BaseTask) GetType() TaskType

func (*BaseTask) IncrementFailureCount

func (t *BaseTask) IncrementFailureCount()

func (*BaseTask) SetProp

func (t *BaseTask) SetProp(key string, value interface{})

func (*BaseTask) UpdateFailureMessage

func (t *BaseTask) UpdateFailureMessage(msg string)

func (*BaseTask) UpdateMetadata

func (t *BaseTask) UpdateMetadata(meta interface{})

func (*BaseTask) WithLogLabels

func (t *BaseTask) WithLogLabels(labels map[string]string) *BaseTask

func (*BaseTask) WithMetadata

func (t *BaseTask) WithMetadata(metadata interface{}) *BaseTask

func (*BaseTask) WithQueueName

func (t *BaseTask) WithQueueName(name string) *BaseTask

func (*BaseTask) WithQueuedAt

func (t *BaseTask) WithQueuedAt(queuedAt time.Time) Task

type MetadataDescriptionGetter added in v1.4.12

type MetadataDescriptionGetter interface {
	GetDescription() string
}

type Task

type Task interface {
	GetId() string
	GetType() TaskType
	IncrementFailureCount()
	GetFailureMessage() string
	UpdateFailureMessage(msg string)
	GetFailureCount() int
	GetLogLabels() map[string]string
	GetQueueName() string
	GetQueuedAt() time.Time
	WithQueuedAt(time.Time) Task
	GetMetadata() interface{}
	UpdateMetadata(interface{})
	GetDescription() string
	GetProp(key string) interface{}
	SetProp(key string, value interface{})
}

type TaskType

type TaskType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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