worker

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 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
	OrgID          uint
	WorkerID       uint
	Name           string
	Labels         map[string]string
	Annotations    map[string]string
	ServerAddr     string
	BootstrapToken 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 skillmgmt provides a NATS consumer that handles unified skill management requests (install, list, uninstall) by shelling out to the leros CLI.
Package skillmgmt provides a NATS consumer that handles unified skill management requests (install, list, uninstall) 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