Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Debug bool
Debug for more verbose output
Functions ¶
func V1TypePointer ¶
func V1TypePointer(watchTypeName K8sAPIName) (v1TypePointer pkgruntime.Object)
V1TypePointer return a valid type pointer derived from the K8sAPIName
Types ¶
type K8sAPIName ¶
type K8sAPIName string
K8sAPIName for v1 service types
const ( // NodeAPIName k8s api name NodeAPIName K8sAPIName = "nodes" // ServiceAPIName k8s api name ServiceAPIName K8sAPIName = "services" // EndpointAPIName k8s api name EndpointAPIName K8sAPIName = "endpoints" // PodAPIName k8s api name PodAPIName K8sAPIName = "pods" )
type QueueController ¶
type QueueController struct { K8sAPIName cache.Indexer workqueue.RateLimitingInterface cache.Controller QueueItems }
QueueController allows the creation of multiple independent queue controllers
func NewQueueController ¶
func NewQueueController(typeName K8sAPIName, RateLimitingInterface workqueue.RateLimitingInterface, Indexer cache.Indexer, Controller cache.Controller) *QueueController
NewQueueController creates a watch callback interface
func (*QueueController) Next ¶
func (c *QueueController) Next() bool
Next pushes the event item to it's queue
func (*QueueController) Publish ¶
func (c *QueueController) Publish(event QueueItem) error
Publish is the business logic of the controller publishing to the mgr's service channel.
type QueueItem ¶
type QueueItem struct { Key string K8sAPIName EventType Interface }
QueueItem publishable object from watch
type QueueMgr ¶
type QueueMgr struct { *kubernetes.Clientset *cache.ListWatch *QueueController }
QueueMgr abstract the parts of a watcher
func NewQueueMgr ¶
func NewQueueMgr(watchTypeName K8sAPIName, clientset *kubernetes.Clientset) *QueueMgr
NewQueueMgr takes a type string (services, pods, nodes, ...) and a *kubernetes.Clientset, v1TypePointer is the type of the reference object &v1.Service{}, &v1.Node{}...
func NewQueueMgrListOpt ¶
func NewQueueMgrListOpt(watchTypeName K8sAPIName, clientset *kubernetes.Clientset, options *metav1.ListOptions) *QueueMgr
NewQueueMgrListOpt takes a type string (services, pods, nodes, ...) and a *kubernetes.Clientset, v1TypePointer is the type of the reference object &v1.Service{}, &v1.Node{}...