client

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Proxy is a package responsible for doing common operations on kubernetes resources like UPDATE DELETE CREATE GET deployment and so on.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist    = errors.New("cluster not exist. ")
	ErrMaintaining = errors.New("cluster being maintaining .please try again later. ")
)

Functions

func BuildApiserverClient

func BuildApiserverClient()

func Client

func Client(cluster string) (*kubernetes.Clientset, error)

func Cluster

func Cluster(cluster string) (*models.Cluster, error)

func Managers

func Managers() *sync.Map

Types

type CacheFactory added in v1.3.0

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

func (*CacheFactory) DeploymentLister added in v1.3.0

func (c *CacheFactory) DeploymentLister() v1beta1.DeploymentLister

func (*CacheFactory) EndpointLister added in v1.3.0

func (c *CacheFactory) EndpointLister() v1.EndpointsLister

func (*CacheFactory) EventLister added in v1.3.0

func (c *CacheFactory) EventLister() v1.EventLister

func (*CacheFactory) HPALister added in v1.3.0

func (*CacheFactory) NodeLister added in v1.3.0

func (c *CacheFactory) NodeLister() v1.NodeLister

func (*CacheFactory) PodLister added in v1.3.0

func (c *CacheFactory) PodLister() v1.PodLister

type ClusterManager

type ClusterManager struct {
	Cluster *models.Cluster
	// Deprecated: use KubeClient instead
	Client *kubernetes.Clientset
	// Deprecated: use KubeClient instead
	CacheFactory *CacheFactory
	Config       *rest.Config
	KubeClient   ResourceHandler
}

func Manager

func Manager(cluster string) (*ClusterManager, error)

func (ClusterManager) Close

func (c ClusterManager) Close()

type ResourceHandler added in v1.3.0

type ResourceHandler interface {
	Create(kind string, namespace string, object *runtime.Unknown) (*runtime.Unknown, error)
	Update(kind string, namespace string, name string, object *runtime.Unknown) (*runtime.Unknown, error)
	Get(kind string, namespace string, name string) (runtime.Object, error)
	List(kind string, namespace string, labelSelector string) ([]runtime.Object, error)
	Delete(kind string, namespace string, name string, options *meta_v1.DeleteOptions) error
}

func NewResourceHandler added in v1.3.0

func NewResourceHandler(kubeClient *kubernetes.Clientset, cacheFactory *CacheFactory) ResourceHandler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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