v1alpha1

package
v1.11.0-RC1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithName

func WithName(name string) buildPredicate

WithName function is used by WithName method as a util. Ideas is to give flexibility for building object by using dot operator as well as passing build predicated to the New constructor.

func WithPhase

func WithPhase(state string) buildPredicate

WithPhase function is used by WithPhase method as a util. Ideas is to give flexibility for building object by using dot operator as well as passing build predicated to the New constructor.

Types

type CStorPool

type CStorPool struct {
	CStorPool *apis.CStorPool
	// contains filtered or unexported fields
}

func New

func New(opts ...buildPredicate) *CStorPool

New is a constructor returns a new instance of cstorpool

func (*CStorPool) Build

func (d *CStorPool) Build() (*apis.CStorPool, []error)

Build returns the final instance of cstorpool

func (*CStorPool) WithName

func (d *CStorPool) WithName(name string) *CStorPool

WithName method fills the name field of cstorpool object.

func (*CStorPool) WithPhase

func (d *CStorPool) WithPhase(state string) *CStorPool

WithPhase method fills the name field of cstorpool object.

type CStorPoolList

type CStorPoolList struct {
	CStorPoolList         *apis.CStorPoolList
	FilteredCStorPoolList *apis.CStorPoolList
	// contains filtered or unexported fields
}

type CstorpoolInterface

type CstorpoolInterface interface {
	Get(name string) (*CStorPool, error)
	List(opts v1.ListOptions) (*CStorPoolList, error)
	Create(*apis.CStorPool) (*CStorPool, error)
}

cstorpoolInterface abstracts operations on cstorpool entity. Different orchestrators may need to implement this interface.

type KubernetesClient

type KubernetesClient struct {
	// kubeclientset is a standard kubernetes clientset
	Kubeclientset kubernetes.Interface

	// clientset is a openebs custom resource package generated for custom API group.
	Clientset clientset.Interface
}

KubernetesClient is the kubernetes client which will implement cstorpool actions/behaviours.

func (*KubernetesClient) Create

func (k *KubernetesClient) Create(diskObj *apis.CStorPool) (*CStorPool, error)

Create is kubernetes client implementation to create disk.

func (*KubernetesClient) Get

func (k *KubernetesClient) Get(name string) (*CStorPool, error)

Get is Kubernetes client implementation to get disk.

func (*KubernetesClient) List

List is kubernetes client implementation to list disk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL