qemu

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

This package provides an interface to fake a CSP API for QEMU instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud added in v2.3.0

type Cloud struct{}

Cloud provides an interface to fake a CSP API for QEMU instances.

func New added in v2.3.0

func New() *Cloud

New returns a new Cloud instance.

func (*Cloud) GetLoadBalancerEndpoint added in v2.3.0

func (c *Cloud) GetLoadBalancerEndpoint(ctx context.Context) (string, error)

GetLoadBalancerEndpoint returns the endpoint of the load balancer. For QEMU, the load balancer is the first control plane node returned by the metadata API.

func (*Cloud) InitSecretHash added in v2.3.0

func (c *Cloud) InitSecretHash(ctx context.Context) ([]byte, error)

InitSecretHash returns the hash of the init secret.

func (*Cloud) List added in v2.3.0

func (c *Cloud) List(ctx context.Context) ([]metadata.InstanceMetadata, error)

List retrieves all instances belonging to the current constellation.

func (*Cloud) Self added in v2.3.0

Self retrieves the current instance.

func (*Cloud) UID added in v2.3.0

func (c *Cloud) UID(_ context.Context) (string, error)

UID returns the UID of the constellation.

type Logger

type Logger struct{}

Logger is a Cloud Logger for QEMU.

func NewLogger

func NewLogger() *Logger

NewLogger creates a new Cloud Logger for QEMU.

func (*Logger) Close

func (l *Logger) Close() error

Close is a no-op.

func (*Logger) Disclose

func (l *Logger) Disclose(msg string)

Disclose writes log information to QEMU's cloud log. This is done by sending a POST request to the QEMU's metadata endpoint.

Jump to

Keyboard shortcuts

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