global

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package global provides global flags for talosctl.

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigContext = fmt.Errorf("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) 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