query

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package query contains a set of APIs for accessing kubernetes objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(into sdkTypes.Object, opts ...GetOption) error

Get gets the specified object and unmarshals the retrieved data into the "into" object. "into" is a sdkTypes.Object that must have "Kind" and "APIVersion" specified in its "TypeMeta" field and "Name" and "Namespace" specified in its "ObjectMeta" field. "opts" configures the Get operation.

When passed With WithGetOptions(o), the specified metav1.GetOptions is set.

func List

func List(namespace string, into sdkTypes.Object, opts ...ListOption) error

List retrieves the specified object list and unmarshals the retrieved data into the "into" object. "namespace" indicates which kubernetes namespace to look for the list of kubernetes objects. "into" is a sdkType.Object that must have "Kind" and "APIVersion" specified in its "TypeMeta" field "opts" configures the List operation.

When passed With WithListOptions(o), the specified metav1.ListOptions is set.

Types

type GetOp

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

GetOp wraps all the options for Get().

func NewGetOp

func NewGetOp() *GetOp

type GetOption

type GetOption func(*GetOp)

GetOption configures GetOp.

func WithGetOptions

func WithGetOptions(metaGetOptions *metav1.GetOptions) GetOption

WithGetOptions sets the metav1.GetOptions for the Get() operation.

type ListOp

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

ListOp wraps all the options for List.

func NewListOp

func NewListOp() *ListOp

type ListOption

type ListOption func(*ListOp)

ListOption configures ListOp.

func WithListOptions

func WithListOptions(metaListOptions *metav1.ListOptions) ListOption

WithListOptions sets the metav1.ListOptions for the List() operation.

Jump to

Keyboard shortcuts

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