custom-pod-autoscaler: github.com/jthomperoo/custom-pod-autoscaler/resourceclient Index | Files

package resourceclient

import "github.com/jthomperoo/custom-pod-autoscaler/resourceclient"

Index

Package Files

resourceclient.go

type Client Uses

type Client interface {
    Get(apiVersion string, kind string, name string, namespace string) (metav1.Object, error)
}

Client provides methods for retrieving arbitrary Kubernetes resources, returned as generalised metav1.Object, which can be converted to concrete types, and allows for retrieving common and shared data (namespaces, names etc.)

type UnstructuredClient Uses

type UnstructuredClient struct {
    Dynamic               dynamic.Interface
    UnstructuredConverter runtime.UnstructuredConverter
}

UnstructuredClient is an implementation of the arbitrary resource client that uses a dynamic Kubernetes interface, retrieving unstructured k8s objects and converting them to metav1.Object

func (*UnstructuredClient) Get Uses

func (u *UnstructuredClient) Get(apiVersion string, kind string, name string, namespace string) (metav1.Object, error)

Get takes descriptors of a Kubernetes object (api version, kind, name, namespace) and fetches the matching object, returning it as a metav1.Object

Package resourceclient imports 7 packages (graph) and is imported by 3 packages. Updated 2020-02-08. Refresh now. Tools for package owners.