task

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2017 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2017 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2017 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	IN_PROGRESS     TaskStatus = "IN_PROGRESS"
	CANCELED                   = "CANCELED"
	FAILED                     = "FAILED"
	COMPLETED                  = "COMPLETED"
	SCHEDULED                  = "SCHEDULED"
	TIMED_OUT                  = "TIMED_OUT"
	READY_FOR_RERUN            = "READY_FOR_RERUN"
	SKIPPED                    = "SKIPPED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	TaskType          string                 `json:"taskType"`
	Status            TaskStatus             `json:"status"`
	InputData         map[string]interface{} `json:"inputData"`
	ReferenceTaskName string                 `json:"referenceTaskName"`
	RetryCount        int                    `json:"retryCount"`
	Seq               int                    `json:"seq"`
	CorrelationId     string                 `json:"correlationId"`
	PollCount         int                    `json:"pollCount"`
	TaskDefName       string                 `json:"taskDefName"`
	// Time when the task was scheduled
	ScheduledTime int64 `json:"scheduledTime"`
	// Time when the task was first polled
	StartTime int64 `json:"startTime"`
	// Time when the task completed executing
	EndTime int64 `json:"endTime"`
	// Time when the task was last updated
	UpdateTime          int64  `json:"updateTime"`
	StartDelayInSeconds int    `json:"startDelayInSeconds"`
	RetriedTaskId       string `json:"retriedTaskId"`
	Retried             bool   `json:"retried"`
	// Default = true
	CallbackFromWorker bool `json:"callbackFromWorker"`
	// DynamicWorkflowTask
	ResponseTimeoutSeconds int                    `json:"responseTimeoutSeconds"`
	WorkflowInstanceId     string                 `json:"workflowInstanceId"`
	TaskId                 string                 `json:"taskId"`
	ReasonForIncompletion  string                 `json:"reasonForIncompletion"`
	CallbackAfterSeconds   int64                  `json:"callbackAfterSeconds"`
	WorkerId               string                 `json:"workerId"`
	OutputData             map[string]interface{} `json:"outputData"`
}

func NewTask

func NewTask() *Task

"Constructor" to initialze non zero value defaults

func ParseTask

func ParseTask(inputJSON string) (*Task, error)

func (*Task) ToJSONString

func (t *Task) ToJSONString() (string, error)

type TaskResult

type TaskResult struct {
	Status                TaskResultStatus       `json:"status"`
	WorkflowInstanceId    string                 `json:"workflowInstanceId"`
	TaskId                string                 `json:"taskId"`
	ReasonForIncompletion string                 `json:"reasonForIncompletion"`
	CallbackAfterSeconds  int64                  `json:"callbackAfterSeconds"`
	WorkerId              string                 `json:"workerId"`
	OutputData            map[string]interface{} `json:"outputData"`
}

func ExampleTaskExecutionFunction

func ExampleTaskExecutionFunction(t *Task) (taskResult *TaskResult, err error)

func NewEmptyTaskResult

func NewEmptyTaskResult() *TaskResult

"Constructor" to initialze non zero value defaults

func NewTaskResult

func NewTaskResult(t *Task) *TaskResult

func ParseTaskResult

func ParseTaskResult(inputJSON string) (*TaskResult, error)

func (*TaskResult) ToJSONString

func (t *TaskResult) ToJSONString() (string, error)

type TaskResultStatus

type TaskResultStatus string

type TaskStatus

type TaskStatus string

type WorkflowTaskType

type WorkflowTaskType uint8
const (
	SIMPLE WorkflowTaskType = iota
	DYNAMIC
	FORK_JOIN
	FORK_JOIN_DYNAMIC
	DECISION
	JOIN
	SUB_WORKFLOW
	EVENT
	WAIT
	USER_DEFINED
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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