task

package
v1.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 3 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
	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