message

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context
	TraceCarrier opentracing.TextMapCarrier `json:"trace_carrier"`
	Execution    Execution                  `json:"execution"`
	State        State                      `json:"state"`
	Job          Job                        `json:"job"`
	Tasks        map[string]*model.Task     `json:"tasks"`
}

type Execution

type Execution struct {
	ID                string           `json:"id"`
	StartTime         time.Time        `json:"start_time"`
	EndTime           time.Time        `json:"end_time"`
	Timeout           *time.Time       `json:"timeout"`
	Cause             model.Cause      `json:"cause"`
	CauseError        *string          `json:"cause_error,omitempty"`
	CauseErrorCode    *model.ErrorCode `json:"cause_error_code,omitempty"`
	MaxConsistentNums int              `json:"max_consistent_nums"`
	ConsistentNums    int              `json:"consistent_nums"`
	MaxTaskExecution  int              `json:"max_task_execution"`
	TaskExecution     int              `json:"task_execution"`
}

type InitJob

type InitJob struct {
	Context     Context `json:"context"`
	JobID       string  `json:"job_id"`
	ParentJobID *string `json:"parent_job_id,omitempty"`
	ParentID    *int64  `json:"parent_id,omitempty"`
	model.Job   `json:",inline"`
}

type Job

type Job struct {
	ID    int64  `json:"id"`
	JobID string `jsonb:"job_id"`
}

type State

type State struct {
	EnteredTime time.Time    `json:"entered_time"`
	Name        string       `json:"name"`
	RetryCount  int          `json:"retry_count"`
	Status      model.Status `json:"status"`
}

type TaskInput

type TaskInput struct {
	Context    Context     `json:"context"`
	InputValue interface{} `json:"input_value"`
	From       string      `json:"from"`
	TaskXID    string      `json:"task_xid"`
	Task       model.Task  `json:"task"`
	Consistent bool        `json:"consistent"`
}

type TaskOutput

type TaskOutput struct {
	Context     Context          `json:"context"`
	ErrorCode   *model.ErrorCode `json:"error_code,omitempty"`
	Error       *string          `json:"error,omitempty"`
	InputValue  interface{}      `json:"input_value"`
	OutputValue interface{}      `json:"output_value"`
	From        string           `json:"from"`
	TaskXID     string           `json:"task_xid"`
	Task        model.Task       `json:"task"`
}

Jump to

Keyboard shortcuts

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