global

package
v1.8.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package global provides global flags for talosctl.

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigContext = errors.New("failed to resolve config context")

ErrConfigContext is returned when config context cannot be resolved.

Functions

This section is empty.

Types

type Args

type Args struct {
	Talosconfig string
	CmdContext  string
	Cluster     string
	Nodes       []string
	Endpoints   []string
}

Args is a context for the Talos command line client.

func (*Args) NodeList added in v1.8.0

func (c *Args) NodeList() []string

NodeList returns the list of nodes to run the command against.

func (*Args) WithClient

func (c *Args) WithClient(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error

WithClient builds upon WithClientNoNodes to provide set of nodes on request context based on config & flags.

func (*Args) WithClientMaintenance

func (c *Args) WithClientMaintenance(enforceFingerprints []string, action func(context.Context, *client.Client) error) error

WithClientMaintenance wraps common code to initialize Talos client in maintenance (insecure mode).

func (*Args) WithClientNoNodes

func (c *Args) WithClientNoNodes(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error

WithClientNoNodes wraps common code to initialize Talos client and provide cancellable context.

WithClientNoNodes doesn't set any node information on the request context.

Jump to

Keyboard shortcuts

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