v1

package
v0.0.0-...-20e8db1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "storage.k8s.io"
	Version   = "v1"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	StorageClassGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "StorageClass",
	}
	StorageClassResource = metav1.APIResource{
		Name:         "storageclasses",
		SingularName: "storageclass",
		Namespaced:   false,
		Kind:         StorageClassGroupVersionKind.Kind,
	}

	StorageClassGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "storageclasses",
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Factory

func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error)

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func NewStorageClass

func NewStorageClass(namespace, name string, obj v1.StorageClass) *v1.StorageClass

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Client) RESTClient

func (c *Client) RESTClient() rest.Interface

func (*Client) Start

func (c *Client) Start(ctx context.Context, threadiness int) error

func (*Client) StorageClasses

func (c *Client) StorageClasses(namespace string) StorageClassInterface

func (*Client) Sync

func (c *Client) Sync(ctx context.Context) error

type Clients

type Clients struct {
	Interface Interface

	StorageClass StorageClassClient
}

func ClientsFrom

func ClientsFrom(ctx context.Context) *Clients

func NewClients

func NewClients(config rest.Config) (*Clients, error)

func NewClientsFromInterface

func NewClientsFromInterface(iface Interface) *Clients

type Interface

type Interface interface {
	RESTClient() rest.Interface
	controller.Starter

	StorageClassesGetter
}

func From

func From(ctx context.Context) Interface

func NewForConfig

func NewForConfig(config rest.Config) (Interface, error)

type StorageClassChangeHandlerFunc

type StorageClassChangeHandlerFunc func(obj *v1.StorageClass) (runtime.Object, error)

type StorageClassClient

type StorageClassClient interface {
	Create(*v1.StorageClass) (*v1.StorageClass, error)
	Get(namespace, name string, opts metav1.GetOptions) (*v1.StorageClass, error)
	Update(*v1.StorageClass) (*v1.StorageClass, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	List(namespace string, opts metav1.ListOptions) (*StorageClassList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)

	Cache() StorageClassClientCache

	OnCreate(ctx context.Context, name string, sync StorageClassChangeHandlerFunc)
	OnChange(ctx context.Context, name string, sync StorageClassChangeHandlerFunc)
	OnRemove(ctx context.Context, name string, sync StorageClassChangeHandlerFunc)
	Enqueue(namespace, name string)

	Generic() controller.GenericController
	ObjectClient() *objectclient.ObjectClient
	Interface() StorageClassInterface
}

type StorageClassClientCache

type StorageClassClientCache interface {
	Get(namespace, name string) (*v1.StorageClass, error)
	List(namespace string, selector labels.Selector) ([]*v1.StorageClass, error)

	Index(name string, indexer StorageClassIndexer)
	GetIndexed(name, key string) ([]*v1.StorageClass, error)
}

type StorageClassController

type StorageClassController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() StorageClassLister
	AddHandler(ctx context.Context, name string, handler StorageClassHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync StorageClassHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler StorageClassHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler StorageClassHandlerFunc)
	Enqueue(namespace, name string)
	Sync(ctx context.Context) error
	Start(ctx context.Context, threadiness int) error
}

type StorageClassHandlerFunc

type StorageClassHandlerFunc func(key string, obj *v1.StorageClass) (runtime.Object, error)

func NewStorageClassLifecycleAdapter

func NewStorageClassLifecycleAdapter(name string, clusterScoped bool, client StorageClassInterface, l StorageClassLifecycle) StorageClassHandlerFunc

type StorageClassIndexer

type StorageClassIndexer func(obj *v1.StorageClass) ([]string, error)

type StorageClassInterface

type StorageClassInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.StorageClass) (*v1.StorageClass, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.StorageClass, error)
	Get(name string, opts metav1.GetOptions) (*v1.StorageClass, error)
	Update(*v1.StorageClass) (*v1.StorageClass, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*StorageClassList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*StorageClassList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() StorageClassController
	AddHandler(ctx context.Context, name string, sync StorageClassHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync StorageClassHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle StorageClassLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle StorageClassLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync StorageClassHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync StorageClassHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle StorageClassLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle StorageClassLifecycle)
}

type StorageClassLifecycle

type StorageClassLifecycle interface {
	Create(obj *v1.StorageClass) (runtime.Object, error)
	Remove(obj *v1.StorageClass) (runtime.Object, error)
	Updated(obj *v1.StorageClass) (runtime.Object, error)
}

type StorageClassList

type StorageClassList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []v1.StorageClass `json:"items"`
}

func (*StorageClassList) DeepCopy

func (in *StorageClassList) DeepCopy() *StorageClassList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassList.

func (*StorageClassList) DeepCopyInto

func (in *StorageClassList) DeepCopyInto(out *StorageClassList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StorageClassList) DeepCopyObject

func (in *StorageClassList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StorageClassLister

type StorageClassLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.StorageClass, err error)
	Get(namespace, name string) (*v1.StorageClass, error)
}

type StorageClassesGetter

type StorageClassesGetter interface {
	StorageClasses(namespace string) StorageClassInterface
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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