kubernetes

package
v0.0.0-...-305df0d Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	List(apiVersion string, kind string, namespace string, labelSelector metav1.LabelSelector) ([]Resource, error)
	Delete(apiVersion string, kind string, namespace string, labelSelector metav1.LabelSelector) error
}

Client is a wrapper around the client-go package for Kubernetes

type ClientAsync

type ClientAsync interface {
	Sync() Client
}

ClientAsync is a wrapper around the client-go package for Kubernetes

func MakeClient

func MakeClient() (ClientAsync, error)

MakeClient returns a ClientAsync

func MakeFromClient

func MakeFromClient(syncClient Client) ClientAsync

MakeFromClient returns a ClientAsync from the given sync client

type ClientAsyncImpl

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

ClientAsyncImpl is the interface implementation of ClientAsync

func (ClientAsyncImpl) Sync

func (c ClientAsyncImpl) Sync() Client

Sync returns the synchronous client

type ClientImpl

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

ClientImpl is the interface implementation of Client

func (ClientImpl) Delete

func (c ClientImpl) Delete(apiVersion string, kind string, namespace string, labelSelector metav1.LabelSelector) error

Delete Kubernetes resource(s)

func (ClientImpl) GetAPIResource

func (c ClientImpl) GetAPIResource(apiVersion string, kind string) (*metav1.APIResource, error)

GetAPIResource returns a specific API resource

func (ClientImpl) GetAPIResources

func (c ClientImpl) GetAPIResources(apiVersion string) (*metav1.APIResourceList, error)

GetAPIResources retrieves and caches API resources for the given API Version

func (ClientImpl) GetGroupVersion

func (c ClientImpl) GetGroupVersion(apiVersion string) schema.GroupVersion

GetGroupVersion maps an APIVersion to a GroupVersion

func (ClientImpl) List

func (c ClientImpl) List(apiVersion string, kind string, namespace string, labelSelector metav1.LabelSelector) ([]Resource, error)

List a Kubernetes resource

func (ClientImpl) RESTClient

func (c ClientImpl) RESTClient(apiVersion string) (rest.Interface, error)

RESTClient creates a kubernetes client for the given API version

type Resource

type Resource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}

Resource represents a Kubernetes resource, which has both Type and Object information

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

DeepCopyInto is required to implement the Kubernetes Object interface

func (*Resource) DeepCopyObject

func (in *Resource) DeepCopyObject() runtime.Object

DeepCopyObject is required to implement the Kubernetes Object interface

type ResourceList

type ResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []Resource `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ResourceList represents a list of Kubernetes resources

func (*ResourceList) DeepCopyInto

func (in *ResourceList) DeepCopyInto(out *ResourceList)

DeepCopyInto is required to implement the Kubernetes Object interface

func (*ResourceList) DeepCopyObject

func (in *ResourceList) DeepCopyObject() runtime.Object

DeepCopyObject is required to implement the Kubernetes Object interface

Jump to

Keyboard shortcuts

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