task

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 4 modules, 30 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) DeepCopyWithNewUUID added in v1.10.1

func (t *BaseTask) DeepCopyWithNewUUID() Task

func (*BaseTask) GetCompactionID added in v1.10.2

func (t *BaseTask) GetCompactionID() string

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) IsProcessing added in v1.10.0

func (t *BaseTask) IsProcessing() bool

func (*BaseTask) SetProcessing added in v1.10.0

func (t *BaseTask) SetProcessing(val bool)

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) WithCompactionID added in v1.10.2

func (t *BaseTask) WithCompactionID(id string) *BaseTask

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{})
	IsProcessing() bool
	SetProcessing(bool)
	DeepCopyWithNewUUID() Task
	GetCompactionID() string
}

type TaskType

type TaskType string

Directories

Path Synopsis
!DEPRECATED
!DEPRECATED

Jump to

Keyboard shortcuts

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