talosapi

package
v0.0.0-...-0c3ae5f Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package talosapi represents the Talos API client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalClient

type LocalClient struct {
	// contains filtered or unexported fields
}

LocalClient represents the Talos API client.

func NewLocalClient

func NewLocalClient(ctx context.Context, log logrus.FieldLogger, configPath string, k8sHost string) (*LocalClient, error)

NewLocalClient creates a new Talos API client.

func NewLocalSocketClient

func NewLocalSocketClient(ctx context.Context, log logrus.FieldLogger) (*LocalClient, error)

NewLocalSocketClient creates a new Talos API client using a local socket.

func (*LocalClient) Close

func (c *LocalClient) Close() error

Close closes the client.

func (*LocalClient) Hostname

func (c *LocalClient) Hostname() string

Hostname returns the hostname.

func (*LocalClient) NetInterfaces

func (c *LocalClient) NetInterfaces() (result []tboxcmds.NetInterface)

NetInterfaces returns the network interfaces.

func (*LocalClient) OSVersion

func (c *LocalClient) OSVersion() string

OSVersion returns the OS version.

func (*LocalClient) OSVersionShort

func (c *LocalClient) OSVersionShort() string

OSVersionShort returns the short OS version.

func (*LocalClient) Reboot

func (c *LocalClient) Reboot() error

Reboot reboots the machine.

func (*LocalClient) Shutdown

func (c *LocalClient) Shutdown() error

Shutdown shuts down the machine.

Jump to

Keyboard shortcuts

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