Help us shape the future of Go! Take the 2026 Go Developer Survey

s4wave_forge_world

package
v0.57.21 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package s4wave_forge_world registers Forge ObjectTypes in the Space World.

Index

Constants

This section is empty.

Variables

ClusterType is the ObjectType for forge/cluster objects.

DashboardType is the ObjectType for spacewave/forge/dashboard objects.

View Source
var ErrWorkerStopPending = errors.New("Worker runtime stop remains pending")

ErrWorkerStopPending reports a durable pending stop whose owner claim must keep renewing until the runtime stop confirms.

ExecutionType is the ObjectType for forge/execution objects.

JobType is the ObjectType for forge/job objects.

PassType is the ObjectType for forge/pass objects.

TaskType is the ObjectType for forge/task objects.

View Source
var WorkerType = objecttype.NewObjectType(forge_worker.WorkerTypeID, forgeWorkerFactory)

WorkerType is the ObjectType for forge/worker objects. Uses forgeWorkerFactory which returns a PersistentExecutionService invoker when the session peer ID matches the Worker's linked keypair.

Functions

func ForgeReadOnlyFactory

func ForgeReadOnlyFactory(
	ctx context.Context,
	le *logrus.Entry,
	b bus.Bus,
	engine world.Engine,
	ws world.WorldState,
	objectKey string,
) (srpc.Invoker, func(), error)

ForgeReadOnlyFactory is a minimal factory for read-only object types. Viewers access block state through the objectState prop directly.

Types

type WorkerAdmission

type WorkerAdmission struct {
	// contains filtered or unexported fields
}

WorkerAdmission owns one Worker's World capacity claim and Docker reservations.

func NewWorkerAdmission

func NewWorkerAdmission(eng world.Engine, workerKey string, peerID peer.ID, claimID string, stopper forge_runtime.RuntimeStopper) *WorkerAdmission

NewWorkerAdmission constructs one Worker admission with a Docker stopper.

func (*WorkerAdmission) ApplyPolicy

func (w *WorkerAdmission) ApplyPolicy(ctx context.Context, deviceKey string, declared *device_policy.ForgeWorkerPolicy) error

ApplyPolicy claims and observes this Worker or drains it when policy removes capacity.

func (*WorkerAdmission) Close

func (w *WorkerAdmission) Close(ctx context.Context) error

Close drains this Worker's remaining runtimes on a clean execution exit. A crashed process leaves the claim to expire at its lease deadline.

func (*WorkerAdmission) Renew

func (w *WorkerAdmission) Renew(ctx context.Context) error

Renew extends the live Worker claim while this execution owns capacity.

func (*WorkerAdmission) Reserve

Reserve debits the Docker target's explicit request under the current claim.

Jump to

Keyboard shortcuts

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