task

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 9

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) 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 MetadataDescriptable

type MetadataDescriptable interface {
	GetDescription() string
}

type Task

type Task interface {
	GetId() string
	GetType() TaskType
	IncrementFailureCount()
	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