task

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State added in v0.7.0

type State int
const (
	Init      State = 1 << iota // 1
	Enqueued                    // 2
	Claimed                     // 4
	Completed                   // 8
	Timedout                    // 16
)

func (State) In added in v0.7.0

func (s State) In(mask State) bool

func (State) String added in v0.7.0

func (s State) String() string

type Task

type Task struct {
	Id            string          `json:"id"`
	Counter       int             `json:"counter"`
	Timeout       int64           `json:"timeout"`
	ProcessId     *string         `json:"processId,omitempty"`
	State         State           `json:"-"`
	RootPromiseId string          `json:"-"`
	Recv          json.RawMessage `json:"-"`
	Mesg          *message.Mesg   `json:"-"`
	Attempt       int             `json:"-"`
	Ttl           int             `json:"-"`
	ExpiresAt     int64           `json:"-"`
	CreatedOn     *int64          `json:"createdOn,omitempty"`
	CompletedOn   *int64          `json:"completedOn,omitempty"`
}

func (*Task) Equals added in v0.7.0

func (t1 *Task) Equals(t2 *Task) bool

func (*Task) String

func (t *Task) String() string

type TaskRecord

type TaskRecord struct {
	Id            string
	ProcessId     *string
	State         State
	RootPromiseId string
	Recv          []byte
	Mesg          []byte
	Timeout       int64
	Counter       int
	Attempt       int
	Ttl           int
	ExpiresAt     int64
	CreatedOn     *int64
	CompletedOn   *int64
}

func (*TaskRecord) Task

func (r *TaskRecord) Task() (*Task, error)

Jump to

Keyboard shortcuts

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