Documentation ¶
Index ¶
- type Kubeclient
- func (k *Kubeclient) Delete(name string, options *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*corev1.Service, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*corev1.ServiceList, error)
- func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
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 ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*corev1.ServiceList, error)
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