worker

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker = client.WorkerClient

type WorkerConfig

type WorkerConfig = client.WorkerConfig

type WorkerEnvType

type WorkerEnvType string
const (
	WorkerEnvProcess  WorkerEnvType = "process"
	WorkerEnvDocker   WorkerEnvType = "docker"
	WorkerEnvKubeVirt WorkerEnvType = "kubevirt"
)

type WorkerInstance

type WorkerInstance struct {
	ID        string
	WorkerID  string
	Status    string
	PID       int
	StartedAt time.Time
	Endpoint  string
}

type WorkerScheduler

type WorkerScheduler interface {
	Start(ctx context.Context, spec *WorkerSpec) (*WorkerInstance, error)
	Stop(ctx context.Context, workerID string) error
	Health(ctx context.Context, workerID string) error
	List(ctx context.Context) ([]*WorkerInstance, error)
}

type WorkerSpec

type WorkerSpec struct {
	ID          string
	Name        string
	Labels      map[string]string
	Annotations map[string]string
	EnvType     WorkerEnvType
	Image       string
	Command     []string
	Args        []string
	Env         map[string]string
	WorkingDir  string
}

Directories

Path Synopsis
Package approval 订阅 NATS 审批消息并路由到 ApprovalRouter。
Package approval 订阅 NATS 审批消息并路由到 ApprovalRouter。
Package router 提供 Worker HTTP 服务的 Gin 路由组装。
Package router 提供 Worker HTTP 服务的 Gin 路由组装。
Package skillinstall provides a lightweight NATS consumer that handles skill installation requests by shelling out to the leros CLI.
Package skillinstall provides a lightweight NATS consumer that handles skill installation requests by shelling out to the leros CLI.
Package taskconsumer consumes worker task messages and executes agent runs.
Package taskconsumer consumes worker task messages and executes agent runs.

Jump to

Keyboard shortcuts

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