platform

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package platform provides functions to get the runtime.Platform.

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

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

type Event struct {
	Type    string
	Message string
	Error   error
}

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

Directories

Path Synopsis
Package akamai contains the Akamai implementation of the [platform.Platform].
Package akamai contains the Akamai implementation of the [platform.Platform].
Package aws contains the AWS implementation of the [platform.Platform].
Package aws contains the AWS implementation of the [platform.Platform].
Package azure contains the Azure implementation of the [platform.Platform].
Package azure contains the Azure implementation of the [platform.Platform].
Package container contains the Container implementation of the [platform.Platform].
Package container contains the Container implementation of the [platform.Platform].
internal/files
Package files provides internal methods to container platform to read files.
Package files provides internal methods to container platform to read files.
Package digitalocean contains the Digital Ocean implementation of the [platform.Platform].
Package digitalocean contains the Digital Ocean implementation of the [platform.Platform].
Package equinixmetal contains the Equinix Metal implementation of the [platform.Platform].
Package equinixmetal contains the Equinix Metal implementation of the [platform.Platform].
Package errors contains errors used by the platform package.
Package errors contains errors used by the platform package.
Package exoscale contains the Exoscale platform implementation.
Package exoscale contains the Exoscale platform implementation.
Package gcp contains the GCP implementation of the [platform.Platform].
Package gcp contains the GCP implementation of the [platform.Platform].
Package hcloud contains the Hcloud implementation of the [platform.Platform].
Package hcloud contains the Hcloud implementation of the [platform.Platform].
internal
address
Package address provides utility functions for address parsing.
Package address provides utility functions for address parsing.
netutils
Package netutils provides network-related helpers for platform implementation.
Package netutils provides network-related helpers for platform implementation.
Package metal contains the metal implementation of the [platform.Platform].
Package metal contains the metal implementation of the [platform.Platform].
oauth2
Package oauth2 implements OAuth2 Device Flow to authenticate machine config download.
Package oauth2 implements OAuth2 Device Flow to authenticate machine config download.
url
Package url handles expansion of the download URL for the config.
Package url handles expansion of the download URL for the config.
Package nocloud provides the NoCloud platform implementation.
Package nocloud provides the NoCloud platform implementation.
Package opennebula provides the OpenNebula platform implementation.
Package opennebula provides the OpenNebula platform implementation.
Package openstack provides the Openstack platform implementation.
Package openstack provides the Openstack platform implementation.
Package oracle provides the Oracle platform implementation.
Package oracle provides the Oracle platform implementation.
Package scaleway provides the Scaleway platform implementation.
Package scaleway provides the Scaleway platform implementation.
Package upcloud provides the UpCloud platform implementation.
Package upcloud provides the UpCloud platform implementation.
Package vmware provides the VMware platform implementation.
Package vmware provides the VMware platform implementation.
Package vultr provides the Vultr platform implementation.
Package vultr provides the Vultr platform implementation.

Jump to

Keyboard shortcuts

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