rpc

package
Version: v0.0.0-...-94c4fd9 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIPrefix = "/json/v1"

	MachineDescriptionRelativeURL           = "/machine/description/{id:.+}"
	MachineEventRelativeURL                 = "/machine/event/"
	PowerCycleCompleteRelativeURL           = "/powercycle/complete/{id:.+}"
	PowerCycleListRelativeURL               = "/powercycle/list"
	PowerCycleStateUpdateRelativeURL        = "/powercycle/state/update"
	SSEMachineDescriptionUpdatedRelativeURL = "/machine/sse/description/updated"

	MachineDescriptionURL           = APIPrefix + MachineDescriptionRelativeURL
	MachineEventURL                 = APIPrefix + MachineEventRelativeURL
	PowerCycleCompleteURL           = APIPrefix + PowerCycleCompleteRelativeURL
	PowerCycleListURL               = APIPrefix + PowerCycleListRelativeURL
	PowerCycleStateUpdateURL        = APIPrefix + PowerCycleStateUpdateRelativeURL
	SSEMachineDescriptionUpdatedURL = APIPrefix + SSEMachineDescriptionUpdatedRelativeURL
)

URL paths.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontendDescription

type FrontendDescription struct {
	MaintenanceMode     string
	IsQuarantined       bool
	Recovering          string
	AttachedDevice      machine.AttachedDevice
	Annotation          machine.Annotation
	Note                machine.Annotation
	Version             string
	PowerCycle          bool
	PowerCycleState     machine.PowerCycleState
	LastUpdated         time.Time
	Battery             int
	Temperature         map[string]float64
	RunningSwarmingTask bool
	LaunchedSwarming    bool
	DeviceUptime        int32
	SSHUserIP           string
	Dimensions          machine.SwarmingDimensions
}

FrontendDescription is the frontend representation of machine.Description. See that struct for details on the fields.

func ToFrontendDescription

func ToFrontendDescription(d machine.Description) FrontendDescription

ToFrontendDescription converts a machine.Description into a FrontendDescription.

func ToListMachinesResponse

func ToListMachinesResponse(descriptions []machine.Description) []FrontendDescription

ToListMachinesResponse converts []machine.Description into []FrontendDescription.

type ListMachinesResponse

type ListMachinesResponse []FrontendDescription

ListMachinesResponse is the full list of all known machines.

type ListPowerCycleResponse

type ListPowerCycleResponse []string

ListPowerCycleResponse is the list of machine ids that need powercycling.

func ToListPowerCycleResponse

func ToListPowerCycleResponse(machineIDs []string) ListPowerCycleResponse

ToListPowerCycleResponse converts the response from store.ListPowerCycle to a ListPowerCycleResponse.

type PowerCycleStateForMachine

type PowerCycleStateForMachine struct {
	MachineID       string
	PowerCycleState machine.PowerCycleState
}

type SetAttachedDevice

type SetAttachedDevice struct {
	AttachedDevice machine.AttachedDevice
}

type SetNoteRequest

type SetNoteRequest struct {
	Message string
}

type SupplyChromeOSRequest

type SupplyChromeOSRequest struct {
	SSHUserIP          string
	SuppliedDimensions machine.SwarmingDimensions
}

type UpdatePowerCycleStateRequest

type UpdatePowerCycleStateRequest struct {
	Machines []PowerCycleStateForMachine
}

Source Files

Jump to

Keyboard shortcuts

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