executor

package
v0.0.0-...-75be81d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 9 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 core.AbstractSystem, task core.Task) error
}

type Result

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

type Service

type Service struct {
	System      core.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