helpers

package
v1.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

InteractiveMode fake mode value for the interactive config mode. Should be never passed to the API.

Variables

This section is empty.

Functions

func AddModeFlags added in v1.0.0

func AddModeFlags(mode *Mode, command *cobra.Command)

AddModeFlags adds deprecated flags to the command and registers mode flag with it's parser.

func ExtractFileFromTarGz added in v0.6.0

func ExtractFileFromTarGz(filename string, r io.ReadCloser) ([]byte, error)

ExtractFileFromTarGz reads a single file data from an archive.

func ExtractTarGz

func ExtractTarGz(localPath string, r io.ReadCloser) error

ExtractTarGz extracts .tar.gz archive from r into filesystem under localPath.

func FailIfMultiNodes

func FailIfMultiNodes(ctx context.Context, command string) error

FailIfMultiNodes checks if ctx contains multi-node request metadata.

func ForEachResource added in v0.9.0

func ForEachResource(ctx context.Context, c *client.Client, callback func(ctx context.Context, msg client.ResourceResponse) error, namespace string, args ...string) error

ForEachResource get resources from the controller runtime and run callback using each element.

func PrintApplyResults added in v1.0.0

func PrintApplyResults(resp *machine.ApplyConfigurationResponse)

PrintApplyResults prints out all warnings and auto apply results.

Types

type Mode added in v1.0.0

type Mode struct {
	Mode        machine.ApplyConfigurationRequest_Mode
	Immediate   bool
	Interactive bool
	OnReboot    bool
	// contains filtered or unexported fields
}

Mode apply, patch, edit config config update mode.

func (*Mode) Set added in v1.0.0

func (m *Mode) Set(value string) error

Set implements Flag interface.

func (Mode) String added in v1.0.0

func (m Mode) String() string

func (*Mode) Type added in v1.0.0

func (m *Mode) Type() string

Type implements Flag interface.

Jump to

Keyboard shortcuts

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