agent

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package agent contains messages for all agents rather than controllers.

All these structures are expected to be used with a SimpleHub that doesn't seralize, hence no serialization directives.

Index

Constants

View Source
const StartUnitResponseTopic = "unit.start.response"

StartUnitResponseTopic is the topic to respond to a start request. The payload is the StartStopResponse type below.

View Source
const StartUnitTopic = "unit.start"

StartUnitTopic is used to request one or more units to start. The payload for a StartUnitTopic is the Units structure.

View Source
const StopUnitResponseTopic = "unit.stop.response"

StopUnitResponseTopic is the topic to respond to a stop request. The payload is the StartStopResponse type below.

View Source
const StopUnitTopic = "unit.stop"

StopUnitTopic is used to request one or more units to stop. The payload for a StopUnitTopic is the Units structure.

View Source
const UnitStatusResponseTopic = "unit.status.response"

UnitStatusResponseTopic is the topic to respond to a status request. The payload is the Status type below.

View Source
const UnitStatusTopic = "unit.status"

UnitStatusTopic is used to request the current status for the units. There is no payload for this request.

Variables

This section is empty.

Functions

This section is empty.

Types

type StartStopResponse

type StartStopResponse map[string]interface{}

StartStopResponse returns a map of the requested unit names, and whether they were stopped, started, or not found.

type Status

type Status map[string]interface{}

Status is a map of unit name to the status value. An interface{} value is returned to allow for simple expansion later. The output of the status is expected to just show a nice string representation of the map.

type Units

type Units struct {
	Names []string
}

Units provides a way to request start or stop multiple units.

Jump to

Keyboard shortcuts

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