task

package
v0.0.0-...-299106d Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTaskResultPath

func GetTaskResultPath(taskId string) string

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, options ...interface{}) (types.TaskInterface, error)

func (*Dispatcher) StoreTaskResult

func (d *Dispatcher) StoreTaskResult(workspace *types.Workspace, taskId string, result []byte) error

Jump to

Keyboard shortcuts

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