platform

package
v1.2.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventTypeActivate is the activate event string.
	EventTypeActivate = "activate"
	// EventTypeFailure is the failure event string.
	EventTypeFailure = "failure"
	// EventTypeInfo is the info event string.
	EventTypeInfo = "info"
	// EventTypeConfigLoaded is the config loaded event string.
	EventTypeConfigLoaded = "talos.prov.config.loaded"
	// EventTypeRebooted is the reboot event string.
	EventTypeRebooted = "talos.prov.host.rebooted"
	// EventTypeInstalled is the installation event string.
	EventTypeInstalled = "talos.prov.os.installed"
	// EventTypeUpgraded is the upgrade event string.
	EventTypeUpgraded = "talos.prov.os.upgraded"
)

nb: these events currently map to those expected by equinix metal. if/when we do other platforms, we should maybe generalize this and map the events inside each platform.

Variables

This section is empty.

Functions

func CurrentPlatform

func CurrentPlatform() (p runtime.Platform, err error)

CurrentPlatform is a helper func for discovering the current platform.

func FireEvent added in v1.1.0

func FireEvent(ctx context.Context, p runtime.Platform, e Event)

FireEvent will call the implemented platform's event function if we know it has one. Error logging is handled in this function and we don't return any error values to the sequencer.

func NewPlatform

func NewPlatform(platform string) (p runtime.Platform, err error)

NewPlatform initializes and returns a runtime.Platform.

Types

type Event added in v1.1.0

type Event struct {
	Type    string
	Message string
}

Event is a struct used below in FireEvent in hopes that we can reuse some of this eventing in other platforms if possible.

Jump to

Keyboard shortcuts

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