Documentation ¶
Index ¶
- func HasAnnotation(key, value string) predicate
- func IsNotUID(uids ...string) predicate
- func ListBuilder() *listBuilder
- func TemplateFunctions() template.FuncMap
- type CSPList
- type Kubeclient
- func (k *Kubeclient) Create(obj *apis.CStorPool) (*apis.CStorPool, error)
- func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CStorPool, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.CStorPoolList, error)
- func (k *Kubeclient) Patch(name string, pt types.PatchType, patchObj []byte) (*apis.CStorPool, error)
- type KubeclientBuildOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasAnnotation ¶
func HasAnnotation(key, value string) predicate
HasAnnotation returns true if provided annotation key and value are present in the provided CSP instance
func IsNotUID ¶
func IsNotUID(uids ...string) predicate
IsNotUID returns true if provided csp instance's UID does not match with any of the provided UIDs
func ListBuilder ¶
func ListBuilder() *listBuilder
ListBuilder returns a new instance of listBuilder object
func TemplateFunctions ¶
TemplateFunctions exposes a few functions as go template functions
Types ¶
type CSPList ¶
type CSPList struct {
// contains filtered or unexported fields
}
CSPList holds the list of cstorpools
func (*CSPList) Filter ¶
Filter will filter the csp instances if all the predicates succeed against that csp.
func (*CSPList) GetPoolUIDs ¶
GetPoolUIDs retuns the UIDs of the pools available in the list
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on CStorPool instance
func NewKubeClient ¶
func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeClient returns a new instance of kubeclient meant for CStorPool related operations
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error
Delete deletes CStorPool instance
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CStorPool, error)
Get returns an CStorPool instance from kubernetes cluster
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.CStorPoolList, error)
List returns a list of CStorPool instances present in kubernetes cluster
type KubeclientBuildOption ¶
type KubeclientBuildOption func(*Kubeclient)
KubeclientBuildOption defines the abstraction to build a Kubeclient instance
func WithClientset ¶
func WithClientset(c *clientset.Clientset) KubeclientBuildOption
WithClientset sets the kubernetes clientset against the kubeclient instance