v1alpha1

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 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 WithPoolType

func WithPoolType(state string) buildPredicate

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

Types

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 storagepool actions/behaviours.

func (*KubernetesClient) Create

func (k *KubernetesClient) Create(spObj *apis.StoragePool) (*StoragePool, error)

Create is kubernetes client implementation to create disk.

func (*KubernetesClient) Get

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

Get is Kubernetes client implementation to get disk.

func (*KubernetesClient) List

List is kubernetes client implementation to list disk.

type StoragePool

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

func New

func New(opts ...buildPredicate) *StoragePool

New is a constructor returns a new instance of storagepool

func (*StoragePool) Build

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

Build returns the final instance of storagepool

func (*StoragePool) WithName

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

WithName method fills the name field of storagepool object.

func (*StoragePool) WithPoolType

func (d *StoragePool) WithPoolType(state string) *StoragePool

WithPoolType method fills the name field of storagepool object.

type StoragePoolList

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

type StoragepoolInterface

type StoragepoolInterface interface {
	Get(name string) (*StoragePool, error)
	List(opts v1.ListOptions) (*StoragePoolList, error)
	Create(storagepool *apis.StoragePool) (*StoragePool, error)
}

StoragepoolInterface abstracts operations on storagepool entity. Different orchestrators may need to implement this interface.

Jump to

Keyboard shortcuts

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