event

package
v0.0.0-...-5f60744 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateSensorTypeCreating    = "sensor.type.creating"
	StateCmdStartMonCmdWaiting = "cmd.monitor.start.waiting"
	StateEnvPreparing          = "env.preparing"
	StateMonCreating           = "monitor.creating"
	StateMonStarting           = "monitor.starting"
)
View Source
const (
	ComSensorConstructor = "sensor.constructor"
	ComSensorCmdServer   = "sensor.cmd.server"
	ComMonitorRunner     = "monitor.runner"
)
View Source
const (
	CtxSensorType = "sensor.type"
	CtxCmdType    = "cmd.type"
)

Variables

View Source
var (
	ErrUnknownEvent    = goerr.New("unknown event type")
	ErrUnexpectedEvent = goerr.New("unexpected event type")
)

Event errors

Functions

This section is empty.

Types

type Message

type Message struct {
	Name Type        `json:"name"`
	Data interface{} `json:"data,omitempty"`
}

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(data []byte) error

type StartMonitorFailedData

type StartMonitorFailedData struct {
	Component string            `json:"component,omitempty"`
	State     string            `json:"state,omitempty"`
	Context   map[string]string `json:"context,omitempty"`
	Errors    []string          `json:"errors,omitempty"`
}

StartMonitorFailed contains additional context for the failure

type Type

type Type string

Type is an event ID type

const (
	StartMonitorDone   Type = "event.monitor.start.done"
	StartMonitorFailed Type = "event.monitor.start.failed"
	StopMonitorDone    Type = "event.monitor.stop.done"
	ShutdownSensorDone Type = "event.sensor.shutdown.done"
	Error              Type = "event.error"
)

Supported events

Jump to

Keyboard shortcuts

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