Documentation ¶
Index ¶
- type Kubeclient
- func (k *Kubeclient) Create(job *batchv1.Job) (*batchv1.Job, error)
- func (k *Kubeclient) Delete(name string, options *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*batchv1.Job, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*batchv1.JobList, error)
- func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
- func (k *Kubeclient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*batchv1.Job, 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 job instance
func NewKubeClient ¶
func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeClient returns a new instance of kubeclient meant for job, caller can configure it with different kubeclientBuildOption
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string, options *metav1.DeleteOptions) error
Delete returns job object for given name
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get(name string, opts metav1.GetOptions) ( *batchv1.Job, error)
Get returns job object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ( []byte, error)
GetRaw returns job object for given name in byte format
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) ( *batchv1.JobList, error)
List returns list of jobs
func (*Kubeclient) ListRaw ¶
func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
ListRaw returns list of jobs in byte format
func (*Kubeclient) Patch ¶
func (k *Kubeclient) Patch( name string, pt types.PatchType, data []byte, subresources ...string, ) (*batchv1.Job, error)
Patch patches job object for given name
func (*Kubeclient) WithNamespace ¶
func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
WithNamespace set namespace in 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 WithKubeConfigPath ¶
func WithKubeConfigPath(path string) KubeclientBuildOption
WithKubeConfigPath sets the kubeConfig path against client instance
func WithNamespace ¶
func WithNamespace(namespace string) KubeclientBuildOption
WithNamespace set namespace in kubeclient object