data

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentAttributes added in v0.18.0

type AgentAttributes struct {
	CPU               *CPU       `json:"cpu,omitempty" yaml:"cpu,omitempty"`
	Memory            *Memory    `json:"memory,omitempty" yaml:"memory,omitempty"`
	BlockDevices      []*Block   `json:"blockDevices,omitempty" yaml:"blockDevices,omitempty"`
	NetworkInterfaces []*Network `json:"networkInterfaces,omitempty" yaml:"networkInterfaces,omitempty"`
	PCIDevices        []*PCI     `json:"pciDevices,omitempty" yaml:"pciDevices,omitempty"`
	GPUDevices        []*GPU     `json:"gpuDevices,omitempty" yaml:"gpuDevices,omitempty"`
	Chassis           *Chassis   `json:"chassis,omitempty" yaml:"chassis,omitempty"`
	BIOS              *BIOS      `json:"bios,omitempty" yaml:"bios,omitempty"`
	Baseboard         *Baseboard `json:"baseboard,omitempty" yaml:"baseboard,omitempty"`
	Product           *Product   `json:"product,omitempty" yaml:"product,omitempty"`
}

AgentAttributes are attributes of an Agent.

func NewAgentAttributes added in v0.18.0

func NewAgentAttributes() *AgentAttributes

NewAgentAttributes initializes a new AgentAttributes struct.

type BIOS added in v0.18.0

type BIOS struct {
	Vendor      *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Version     *string `json:"version,omitempty" yaml:"version,omitempty"`
	ReleaseDate *string `json:"releaseDate,omitempty" yaml:"releaseDate,omitempty"`
}

type BMCMachine

type BMCMachine struct {
	Host          string
	User          string
	Pass          string
	Port          int
	CipherSuite   string
	SSHPublicKeys []string
}

type Baseboard added in v0.18.0

type Baseboard struct {
	Vendor       *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Product      *string `json:"product,omitempty" yaml:"product,omitempty"`
	Version      *string `json:"version,omitempty" yaml:"version,omitempty"`
	SerialNumber *string `json:"serialNumber,omitempty" yaml:"serialNumber,omitempty"`
}

type Block added in v0.18.0

type Block struct {
	Name              *string `json:"name,omitempty" yaml:"name,omitempty"`
	ControllerType    *string `json:"controllerType,omitempty" yaml:"controllerType,omitempty"`
	DriveType         *string `json:"driveType,omitempty" yaml:"driveType,omitempty"`
	Size              *string `json:"size,omitempty" yaml:"size,omitempty"`
	PhysicalBlockSize *string `json:"physicalBlockSize,omitempty" yaml:"physicalBlockSize,omitempty"`
	Vendor            *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Model             *string `json:"model,omitempty" yaml:"model,omitempty"`
}

type CPU added in v0.18.0

type CPU struct {
	TotalCores   *uint32      `json:"totalCores,omitempty" yaml:"totalCores,omitempty"`
	TotalThreads *uint32      `json:"totalThreads,omitempty" yaml:"totalThreads,omitempty"`
	Processors   []*Processor `json:"processors,omitempty" yaml:"processors,omitempty"`
}

type Chassis added in v0.18.0

type Chassis struct {
	Serial *string `json:"serial,omitempty" yaml:"serial,omitempty"`
	Vendor *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
}

type DHCP

type DHCP struct {
	MACAddress       net.HardwareAddr // chaddr DHCP header.
	IPAddress        netip.Addr       // yiaddr DHCP header.
	SubnetMask       net.IPMask       // DHCP option 1.
	DefaultGateway   netip.Addr       // DHCP option 3.
	NameServers      []net.IP         // DHCP option 6.
	Hostname         string           // DHCP option 12.
	DomainName       string           // DHCP option 15.
	BroadcastAddress netip.Addr       // DHCP option 28.
	NTPServers       []net.IP         // DHCP option 42.
	VLANID           string           // DHCP option 43.116.
	LeaseTime        uint32           // DHCP option 51.
	Arch             string           // DHCP option 93.
	DomainSearch     []string         // DHCP option 119.
	Disabled         bool             // If true, no DHCP response should be sent.
}

DHCP holds the DHCP headers and options to be set in a DHCP handler response. This is the API between a DHCP handler and a backend.

func (*DHCP) EncodeToAttributes

func (d *DHCP) EncodeToAttributes() []attribute.KeyValue

EncodeToAttributes returns a slice of opentelemetry attributes that can be used to set span.SetAttributes.

type Ec2Instance

type Ec2Instance struct {
	Userdata string
	Metadata Metadata
}

Ec2Instance is a struct that contains the hardware data exposed from the EC2 API endpoints. For an explanation of the endpoints refer to the AWS EC2 Ec2Instance Metadata documentation.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html

Note not all AWS EC2 Ec2Instance Metadata categories are supported as some are not applicable. Deviations from the AWS EC2 Ec2Instance Metadata should be documented here.

type GPU added in v0.18.0

type GPU struct {
	Vendor  *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Product *string `json:"product,omitempty" yaml:"product,omitempty"`
	Class   *string `json:"class,omitempty" yaml:"class,omitempty"`
	Driver  *string `json:"driver,omitempty" yaml:"driver,omitempty"`
}

type HackInstance

type HackInstance struct {
	Metadata struct {
		Instance struct {
			Storage struct {
				Disks []struct {
					Device     string `json:"device"`
					Partitions []struct {
						Label  string `json:"label"`
						Number int    `json:"number"`
						Size   uint64 `json:"size"`
					} `json:"partitions"`
					WipeTable bool `json:"wipe_table"`
				} `json:"disks"`
				Filesystems []struct {
					Mount struct {
						Create struct {
							Options []string `json:"options"`
						} `json:"create"`
						Device string `json:"device"`
						Format string `json:"format"`
						Point  string `json:"point"`
					} `json:"mount"`
				} `json:"filesystems"`
			} `json:"storage"`
		} `json:"instance"`
	} `json:"metadata"`
}

Instance is a representation of the instance metadata. Its based on the rooitio hub action and should have just enough information for it to work.

type LicenseActivation

type LicenseActivation struct {
	State string
}

LicenseActivation is part of OperatingSystem.

type Memory added in v0.18.0

type Memory struct {
	Total  *string `json:"total,omitempty" yaml:"total,omitempty"`
	Usable *string `json:"usable,omitempty" yaml:"usable,omitempty"`
}

type Metadata

type Metadata struct {
	InstanceID      string
	Hostname        string
	LocalHostname   string
	IQN             string
	Plan            string
	Facility        string
	Tags            []string
	PublicKeys      []string
	PublicIPv4      string
	PublicIPv6      string
	LocalIPv4       string
	OperatingSystem OperatingSystem
}

Metadata is a part of Instance.

type Netboot

type Netboot struct {
	AllowNetboot  bool     // If true, the client will be provided netboot options in the DHCP offer/ack.
	IPXEScriptURL *url.URL // Overrides a default value that is passed into DHCP on startup.
	IPXEScript    string   // Overrides a default value that is passed into DHCP on startup.
	Console       string
	Facility      string
	OSIE          OSIE
}

Netboot holds info used in netbooting a client.

func (*Netboot) EncodeToAttributes

func (n *Netboot) EncodeToAttributes() []attribute.KeyValue

EncodeToAttributes returns a slice of opentelemetry attributes that can be used to set span.SetAttributes.

type Network added in v0.18.0

type Network struct {
	Name                *string  `json:"name,omitempty" yaml:"name,omitempty"`
	Mac                 *string  `json:"mac,omitempty" yaml:"mac,omitempty"`
	Speed               *string  `json:"speed,omitempty" yaml:"speed,omitempty"`
	EnabledCapabilities []string `json:"enabledCapabilities,omitempty" yaml:"enabledCapabilities,omitempty"`
}

type OSIE

type OSIE struct {
	// BaseURL is the URL where the OSIE parts are located.
	BaseURL *url.URL
	// Kernel is the name of the kernel file.
	Kernel string
	// Initrd is the name of the initrd file.
	Initrd string
}

OSIE or OS Installation Environment is the data about where the OSIE parts are located.

type OperatingSystem

type OperatingSystem struct {
	Slug              string
	Distro            string
	Version           string
	ImageTag          string
	LicenseActivation LicenseActivation
}

OperatingSystem is part of Metadata.

type PCI added in v0.18.0

type PCI struct {
	Vendor  *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Product *string `json:"product,omitempty" yaml:"product,omitempty"`
	Class   *string `json:"class,omitempty" yaml:"class,omitempty"`
	Driver  *string `json:"driver,omitempty" yaml:"driver,omitempty"`
}

type Processor added in v0.18.0

type Processor struct {
	ID           *uint32  `json:"id,omitempty" yaml:"id,omitempty"`
	Cores        *uint32  `json:"cores,omitempty" yaml:"cores,omitempty"`
	Threads      *uint32  `json:"threads,omitempty" yaml:"threads,omitempty"`
	Vendor       *string  `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	Model        *string  `json:"model,omitempty" yaml:"model,omitempty"`
	Capabilities []string `json:"capabilities,omitempty" yaml:"capabilities,omitempty"`
}

type Product added in v0.18.0

type Product struct {
	Name         *string `json:"name,omitempty" yaml:"name,omitempty"`
	Vendor       *string `json:"vendor,omitempty" yaml:"vendor,omitempty"`
	SerialNumber *string `json:"serialNumber,omitempty" yaml:"serialNumber,omitempty"`
}

Jump to

Keyboard shortcuts

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