task

package
v0.0.0-...-b36b742 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerializeHttpPayload

func SerializeHttpPayload(ctx echo.Context) (*types.TaskPayload, error)

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

func NewDispatcher

func NewDispatcher(ctx context.Context, taskRepo repository.TaskRepository) (*Dispatcher, error)

func (*Dispatcher) Claim

func (d *Dispatcher) Claim(ctx context.Context, workspaceName, stubId, taskId, containerId string) error

func (*Dispatcher) Complete

func (d *Dispatcher) Complete(ctx context.Context, workspaceName, stubId, taskId string) error

func (*Dispatcher) Register

func (d *Dispatcher) Register(executor string, taskFactory func(ctx context.Context, message types.TaskMessage) (types.TaskInterface, error))

func (*Dispatcher) Retrieve

func (d *Dispatcher) Retrieve(ctx context.Context, workspaceName, stubId, taskId string) (types.TaskInterface, error)

func (*Dispatcher) RetryTask

func (d *Dispatcher) RetryTask(ctx context.Context, task types.TaskInterface) error

func (*Dispatcher) Send

func (d *Dispatcher) Send(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, payload *types.TaskPayload, policy types.TaskPolicy) (types.TaskInterface, error)

func (*Dispatcher) SendAndExecute

func (d *Dispatcher) SendAndExecute(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, payload *types.TaskPayload, policy types.TaskPolicy) (types.TaskInterface, error)

Jump to

Keyboard shortcuts

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