v1alpha1

package
v1.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubeclient

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

Kubeclient enables kubernetes API operations on service instance

func NewKubeclient

func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeclient returns a new instance of kubeclient meant for service, caller can configure it with different kubeclientBuildOption

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string, options *metav1.DeleteOptions) error

Delete returns service object for given name

func (*Kubeclient) Get

func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*corev1.Service, error)

Get returns service object for given name

func (*Kubeclient) GetRaw

func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)

GetRaw returns service object for given name in byte format

func (*Kubeclient) List

List returns list of services

func (*Kubeclient) ListRaw

func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)

ListRaw returns list of services in byte format

func (*Kubeclient) WithNamespace

func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient

WithNamespace set the provided namespace against this kubeclient object

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a kubeclient instance

func WithClientset

func WithClientset(c *kubernetes.Clientset) KubeclientBuildOption

WithClientset sets the kubernetes client against the kubeclient instance

func WithNamespace

func WithNamespace(namespace string) KubeclientBuildOption

WithNamespace set namespace in kubeclient object

Jump to

Keyboard shortcuts

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