Documentation
¶
Overview ¶
Package controller is a general setup routine. It will establish k8s client and elect a leader. Then it will give a chance to the caller to configure queues and run the control loop.
Index ¶
- Variables
- func Main(...)
- type BasicController
- func (c *BasicController) Dequeue(queue workqueue.RateLimitingInterface, obj interface{})
- func (c *BasicController) Enqueue(queue workqueue.RateLimitingInterface, obj interface{})
- func (c *BasicController) ProcessNextWorkItem(name string, queue workqueue.RateLimitingInterface, ...) bool
- func (c *BasicController) Requeue(queue workqueue.RateLimitingInterface, old interface{}, new interface{})
- func (c *BasicController) Run(threadiness int, stopCh <-chan struct{}, ...) error
- func (c *BasicController) RunWorker(name string, queue workqueue.RateLimitingInterface, ...) func()
- func (c *BasicController) Stop()
- type Controller
Constants ¶
This section is empty.
Variables ¶
View Source
var Version string
Functions ¶
Types ¶
type BasicController ¶
type BasicController struct {
Ctx context.Context
ControllerName string
ControllerId string
KubeClientSet kubernetes.Interface
Namespace string
KubeInformerFactory kubeinformers.SharedInformerFactory
Recorder record.EventRecorder
}
func New ¶
func New( ctx context.Context, kubeClientSet kubernetes.Interface, namespace, controllerName, controllerId string, ) *BasicController
func (*BasicController) Dequeue ¶
func (c *BasicController) Dequeue(queue workqueue.RateLimitingInterface, obj interface{})
func (*BasicController) Enqueue ¶
func (c *BasicController) Enqueue(queue workqueue.RateLimitingInterface, obj interface{})
func (*BasicController) ProcessNextWorkItem ¶
func (c *BasicController) ProcessNextWorkItem( name string, queue workqueue.RateLimitingInterface, handler func(namespace, name string) error, ) bool
func (*BasicController) Requeue ¶
func (c *BasicController) Requeue(queue workqueue.RateLimitingInterface, old interface{}, new interface{})
func (*BasicController) Run ¶
func (c *BasicController) Run( threadiness int, stopCh <-chan struct{}, setup func(threadiness int, stopCh <-chan struct{}) error, shutdown func(), ) error
func (*BasicController) RunWorker ¶
func (c *BasicController) RunWorker( name string, queue workqueue.RateLimitingInterface, handler func(namespace, name string) error, ) func()
func (*BasicController) Stop ¶
func (c *BasicController) Stop()
type Controller ¶
type Controller interface {
Run(threadiness int, stopCh <-chan struct{}) error
Stop()
Enqueue(queue workqueue.RateLimitingInterface, obj interface{})
RunWorker(
name string,
queue workqueue.RateLimitingInterface,
handler func(namespace, name string) error,
) func()
ProcessNextWorkItem(
name string,
queue workqueue.RateLimitingInterface,
handler func(namespace, name string) error,
) bool
}
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dynamic-pvc-provisioner
command
|
|
|
reclaimable-pv-releaser
command
|
|
|
Package leader is an election mechanism as explained in https://github.com/kubernetes/client-go/blob/master/examples/leader-election/main.go
|
Package leader is an election mechanism as explained in https://github.com/kubernetes/client-go/blob/master/examples/leader-election/main.go |
|
Package provisioner is a dynamic PVC provisioner.
|
Package provisioner is a dynamic PVC provisioner. |
|
Package releaser is an automatic PV reclaimer.
|
Package releaser is an automatic PV reclaimer. |
Click to show internal directories.
Click to hide internal directories.