contextoptions

package
v1.17.0-beta16 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubecontextFrom

func KubecontextFrom(ctx context.Context) string

KubecontextFrom pulls the kube context if it was stuffed into the go context. Returns an empty string if it was not set.

Types

type Consul

type Consul struct {
	UseConsul       bool // enable consul config clients
	RootKey         string
	AllowStaleReads bool
	Client          func() (*api.Client, error)
}

type ContextAccessible

type ContextAccessible struct {
	Interactive    bool
	File           string
	Verbose        bool   // currently only used by install and uninstall, sends kubectl command output to terminal
	KubeConfig     string // file to use for kube config, if not standard one.
	ErrorsOnly     bool
	ConfigFilePath string
	Consul         Consul // use consul as config backend
	ReadOnly       bool   // Makes check read only by skipping any checks that create resources in the cluster
	KubeContext    string // kube context to use when interacting with kubernetes
}

ContextAccessible is a set of options that are possibly stuffed into the go context This is a sub section of cli options that we believe are valuable for use in sub cli functions.

func ContextAccessibleFrom

func ContextAccessibleFrom(ctx context.Context) ContextAccessible

ContextAccessibleFrom attempts to pull our options that have been stuffed into the go context. This relies on "top" being set on the context via the root of the cli package.

Jump to

Keyboard shortcuts

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