installer

package
v1.4.4 Latest Latest
Warning

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

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

Documentation

Overview

Package installer contains terminal UI based talos interactive installer parts.

Package installer contains terminal UI based talos interactive installer parts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection unifies clients for bootstrap node and the node which is being configured.

func NewConnection

func NewConnection(ctx context.Context, nodeClient *client.Client, endpoint string, options ...Option) (
	*Connection,
	error,
)

NewConnection creates new installer connection.

func (*Connection) ApplyConfiguration

func (c *Connection) ApplyConfiguration(
	req *machine.ApplyConfigurationRequest,
	callOptions ...grpc.CallOption,
) (*machine.ApplyConfigurationResponse, error)

ApplyConfiguration calls ApplyConfiguration on the target node using appropriate node context.

func (*Connection) Disks

func (c *Connection) Disks(callOptions ...grpc.CallOption) (*storage.DisksResponse, error)

Disks get disks list from the target node.

func (*Connection) ExpandingCluster

func (c *Connection) ExpandingCluster() bool

ExpandingCluster check if bootstrap node is set.

func (*Connection) GenerateConfiguration

func (c *Connection) GenerateConfiguration(
	req *machine.GenerateConfigurationRequest,
	callOptions ...grpc.CallOption,
) (*machine.GenerateConfigurationResponse, error)

GenerateConfiguration calls GenerateConfiguration on the target/bootstrap node.

func (c *Connection) Links() ([]Link, error)

Links gets a list of network interfaces.

type Installer

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

Installer interactive installer text based UI.

func NewInstaller

func NewInstaller() *Installer

NewInstaller creates a new text based installer.

func (*Installer) Run

func (installer *Installer) Run(conn *Connection) error

Run starts interactive installer.

type Link struct {
	Name         string
	Physical     bool
	Up           bool
	HardwareAddr net.HardwareAddr
	MTU          int
}

Link a subset of fields from LinkStatus resource.

type Option

type Option func(c *Connection) error

Option represents a single connection option.

func WithBootstrapNode

func WithBootstrapNode(ctx context.Context, bootstrapClient *client.Client, bootstrapNode string) Option

WithBootstrapNode configures bootstrap node endpoint.

func WithDryRun

func WithDryRun(dryRun bool) Option

WithDryRun enables dry run mode in the installer.

type Page

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

Page represents a single installer page.

func NewPage

func NewPage(name string, items ...*components.Item) *Page

NewPage creates a new installer page.

type State

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

State installer state.

func NewState

func NewState(ctx context.Context, installer *Installer, conn *Connection) (*State, error)

NewState creates new installer state.

func (*State) GenConfig

GenConfig returns current config encoded in yaml.

Jump to

Keyboard shortcuts

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