task

package
v1.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: Apache-2.0 Imports: 3 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
	QueueName    string

	Metadata interface{}
}

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

func (t *BaseTask) GetQueueName() string

func (*BaseTask) GetType

func (t *BaseTask) GetType() TaskType

func (*BaseTask) IncrementFailureCount

func (t *BaseTask) IncrementFailureCount()

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

type MetadataDescriptable

type MetadataDescriptable interface {
	GetDescription() string
}

type Task

type Task interface {
	GetId() string
	GetType() TaskType
	IncrementFailureCount()
	GetFailureCount() int
	GetLogLabels() map[string]string
	GetQueueName() string
	GetMetadata() interface{}
	GetDescription() string
}

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