executor

package
v0.0.0-...-0174093 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const QueueName = "executor"

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Execute(ctx context.Context, sys system.AbstractSystem, task task.Task) error
}

type Result

type Result struct {
	TaskID string
	Status Status
	Data   []byte
}

type Service

type Service struct {
	System      system.AbstractSystem
	ResultCodec codec.Codec[Result, []byte]
	Executor    Executor

	service.Core
}

func (*Service) Run

func (srvc *Service) Run(ctx context.Context) error

type Status

type Status string
const (
	OK     Status = "ok"
	Failed        = "failed"
)

Jump to

Keyboard shortcuts

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