Documentation ¶
Overview ¶
Proxy is a package responsible for doing common operations on kubernetes resources like UPDATE DELETE CREATE GET deployment and so on.
Index ¶
- Variables
- func BuildApiserverClient()
- func Client(cluster string) (*kubernetes.Clientset, error)
- func Cluster(cluster string) (*models.Cluster, error)
- func Managers() *sync.Map
- type CacheFactory
- func (c *CacheFactory) DeploymentLister() v1beta1.DeploymentLister
- func (c *CacheFactory) EndpointLister() v1.EndpointsLister
- func (c *CacheFactory) EventLister() v1.EventLister
- func (c *CacheFactory) HPALister() autoscalingv1.HorizontalPodAutoscalerLister
- func (c *CacheFactory) NodeLister() v1.NodeLister
- func (c *CacheFactory) PodLister() v1.PodLister
- type ClusterManager
- type ResourceHandler
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()
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 (c *CacheFactory) HPALister() autoscalingv1.HorizontalPodAutoscalerLister
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
Click to show internal directories.
Click to hide internal directories.