kubernetes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEvents

func GetEvents(ctx context.Context, resourceUID string, options ...EventerOption) ([]corev1.Event, error)

GetEvents returns a list of kubernetes Events

func GetResources

func GetResources(ctx context.Context, options ...ResourcerOption) ([]unstructured.Unstructured, error)

GetResources returns a list of unstructured resources. You must know what you asked for, and convert to actual types

func KubeCtlRawResourcer

func KubeCtlRawResourcer(ctx context.Context, args ...string) ([]unstructured.Unstructured, error)

KubeCtlRawResourcer uses the kubectl binary to retrieve resources

Types

type Eventer

type Eventer func(ctx context.Context, resource unstructured.Unstructured, options ...EventerOption) ([]corev1.Event, error)

Eventer should return kubernetes events

type EventerOption

type EventerOption func(option *EventerOptions)

EventerOption is part of the functional API for Eventer

type EventerOptions

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

EventerOptions is part of the functional API for Eventer

type Resourcer

type Resourcer func(ctx context.Context, options ...ResourcerOption) ([]unstructured.Unstructured, error)

Resourcer should return kubernetes resources

type ResourcerOption

type ResourcerOption func(opt *ResourcerOptions)

ResourcerOption is part of the functional API for Resourcer

type ResourcerOptions

type ResourcerOptions struct {
	// Name corresponds to `NAME` within `kubectl get TYPE NAME`
	// Cannot be combined with Filename option
	Name string

	// Type corresponds to `pod` within `kubectl get pod`
	// Cannot be combined with Filename option
	Type string

	// Namespace corresponds to the option: -n, --namespace=”: If present, the namespace scope for this CLI request
	// Cannot be combined with Filename option
	Namespace string

	// Selector corresponds to the option: -l, --selector=”: Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
	// Cannot be combined with Filename option
	Selector string

	// Filename corresponds to the option: -f, --filename=[]: Filename, directory, or URL to files identifying the resource to get from a server.
	// Cannot be combined with Name, Type, Namespace or Selector Options
	Filename string

	// Recursive corresponds to the option: -R, --recursive=false: Process the directory used in -f, --filename recursively. Useful when you want to manage
	// related manifests organized within the same directory.
	// Only valid when using the Filename Option
	Recursive bool
	// contains filtered or unexported fields
}

ResourcerOptions is part of the functional API for Resourcer

func (*ResourcerOptions) GetCmdArgs

func (opts *ResourcerOptions) GetCmdArgs() []string

GetCmdArgs is part of the functional API for Resourcer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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