workerrun

package
v0.182.6 Latest Latest
Warning

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

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

Documentation

Overview

Package workerrun coordinates sandbox-inherited worker leases and execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalRoots

func CanonicalRoots(input []string) ([]string, error)

Types

type ConnectRequest

type ConnectRequest struct {
	ProjectsRoot, WorkerID string
	Roots                  []string
	CPUCapacity            uint32
}

type ConnectResult

type ConnectResult struct {
	WorkerID              string   `json:"worker_id"`
	WorkerGeneration      string   `json:"worker_generation"`
	SchedulerGeneration   string   `json:"scheduler_generation"`
	Build                 string   `json:"build"`
	ProtocolVersion       uint32   `json:"protocol_version"`
	OS                    string   `json:"os"`
	Arch                  string   `json:"arch"`
	CPUCapacity           uint32   `json:"cpu_capacity"`
	PermittedRoots        []string `json:"permitted_roots"`
	HeartbeatMilliseconds uint32   `json:"heartbeat_milliseconds"`
}

type Dependencies

type Dependencies struct {
	Client   func(context.Context, string, io.Writer) (daemonv1connect.DaemonServiceClient, error)
	Snapshot func() buildinfo.Report
}

type Service

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

func New

func New(deps Dependencies) Service

func (Service) Connect

func (service Service) Connect(ctx context.Context, request ConnectRequest, announce func(ConnectResult) error, diagnostics io.Writer) error

Jump to

Keyboard shortcuts

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