kubecli

package
v0.0.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() (*kubernetes.Clientset, error)

func GetFromFlags

func GetFromFlags(master string, kubeconfig string) (*kubernetes.Clientset, error)

func GetRESTClient

func GetRESTClient() (*rest.RESTClient, error)

func GetRESTClientFromFlags

func GetRESTClientFromFlags(master string, kubeconfig string) (*rest.RESTClient, error)

func HandlePanic

func HandlePanic()

func NewListWatchFromClient

func NewListWatchFromClient(c cache.Getter, resource string, namespace string, fieldSelector fields.Selector, labelSelector labels.Selector) *cache.ListWatch

NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewControllerFromInformer

func NewControllerFromInformer(indexer cache.Store, informer cache.ControllerInterface, queue workqueue.RateLimitingInterface, dispatch ControllerDispatch) (cache.Store, *Controller)

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh chan struct{})

func (*Controller) ShutDownQueue

func (c *Controller) ShutDownQueue()

Shut down the embedded queue. After the shutdown was issued, all items already in the queue will be processed but no new items will be accepted. It is possible to wait via #WaitUntilDone() until the last item was processed.

func (*Controller) StartInformer

func (c *Controller) StartInformer(stopCh chan struct{})

func (*Controller) WaitForSync

func (c *Controller) WaitForSync(stopCh chan struct{})

func (*Controller) WaitUntilDone

func (c *Controller) WaitUntilDone()

type ControllerDispatch

type ControllerDispatch interface {
	Execute(cache.Store, workqueue.RateLimitingInterface, interface{})
}

type ControllerFunc

type ControllerFunc func(cache.Store, workqueue.RateLimitingInterface, interface{})

type KubevirtClient

type KubevirtClient interface {
	VM(namespace string) VMInterface
}

func GetKubevirtClient

func GetKubevirtClient() (KubevirtClient, error)

func GetKubevirtClientFromFlags

func GetKubevirtClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)

type MockKubevirtClient

type MockKubevirtClient struct {
	// contains filtered or unexported fields
}

Mock of KubevirtClient interface

func NewMockKubevirtClient

func NewMockKubevirtClient(ctrl *gomock.Controller) *MockKubevirtClient

func (*MockKubevirtClient) EXPECT

func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder

func (*MockKubevirtClient) VM

func (_m *MockKubevirtClient) VM(namespace string) VMInterface

type MockVMInterface

type MockVMInterface struct {
	// contains filtered or unexported fields
}

Mock of VMInterface interface

func NewMockVMInterface

func NewMockVMInterface(ctrl *gomock.Controller) *MockVMInterface

func (*MockVMInterface) Create

func (_m *MockVMInterface) Create(_param0 *v11.VM) (*v11.VM, error)

func (*MockVMInterface) Delete

func (_m *MockVMInterface) Delete(name string, options *v1.DeleteOptions) error

func (*MockVMInterface) EXPECT

func (_m *MockVMInterface) EXPECT() *_MockVMInterfaceRecorder

func (*MockVMInterface) Get

func (_m *MockVMInterface) Get(name string, options v10.GetOptions) (*v11.VM, bool, error)

func (*MockVMInterface) List

func (_m *MockVMInterface) List(opts v1.ListOptions) (*v11.VMList, error)

func (*MockVMInterface) Update

func (_m *MockVMInterface) Update(_param0 *v11.VM) (*v11.VM, error)

type VMInterface

type VMInterface interface {
	Get(name string, options k8smetav1.GetOptions) (*v1.VM, bool, error)
	List(opts k8sv1.ListOptions) (*v1.VMList, error)
	Create(*v1.VM) (*v1.VM, error)
	Update(*v1.VM) (*v1.VM, error)
	Delete(name string, options *k8sv1.DeleteOptions) error
}

Jump to

Keyboard shortcuts

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