machinestatusep

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListMachineStatusEndpoint

type ListMachineStatusEndpoint struct{}

Returns what every machine is running right now, how much is left on it, and what is queued behind that.

The whole floor comes back in one response rather than a page at a time, so a wall display can render it in a single call.

Assembled from the published schedule, the batches the floor has scanned against each campaign, and any open downtime. A campaign is `current` once its week is released and while it still has batches to scan; when the last one is scanned it hands over to the next, so this advances on its own as a shift progresses.

A machine with an open stoppage reads `down` even when it has a released campaign, because a broken machine is not producing whatever the plan says. A machine with nothing released reads `idle`, which is a state worth seeing rather than an absence from the list.

Reads the published version rather than the newest draft: the floor works to what was committed, and a draft regenerating underneath a wall display would make machines appear to change job on their own. With nothing published every machine reads idle rather than the request failing.

type ListMachineStatusRequest

type ListMachineStatusRequest struct {
	// Only include machines in these departments.
	DepartmentIDs []string `query:"department_ids"`
	// The moment to read the floor at.
	//
	// Chooses the week the campaigns are read for, and the published schedule whose horizon covers that moment; open downtime and scan progress are always read as they stand now. Omit it to read the floor as it is at this instant.
	AsOf *time.Time `query:"as_of"`
}

Request for the state of the floor.

type MachineStatusSvc

type MachineStatusSvc interface {
	ListMachineStatus(ctx context.Context, req *ListMachineStatusRequest) (*apiresource.List[apiresource.MachineStatus], *apierror.APIError)
}

func NewMachineStatusSvc

func NewMachineStatusSvc(cfg *MachineStatusSvcConfig) MachineStatusSvc

type MachineStatusSvcConfig

type MachineStatusSvcConfig struct {
	// CoreClient (required) is the core-service fulfillment gRPC client.
	CoreClient pb.CoreFulfillmentServiceClient
}

Jump to

Keyboard shortcuts

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