microservices

package
v3.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	Started                     bool
	Context                     context.Context
	Informer                    cache.SharedIndexInformer              // The informer to attach to
	InformerHandlerRegistration cache.ResourceEventHandlerRegistration // We save the Registration here to unregister when shutting down
	ResyncPeriod                time.Duration
	// contains filtered or unexported fields
}

func (*BaseController) AddEventHandlerWithResyncPeriod

func (c *BaseController) AddEventHandlerWithResyncPeriod() error

func (*BaseController) GetWorkqueue

func (c *BaseController) GetWorkqueue() workqueue.Interface

func (*BaseController) SetReconciler

func (c *BaseController) SetReconciler(r Reconciler)

Set the reconciler interface with the controller specific reconcile logic

func (*BaseController) SetWorkScheduler

func (c *BaseController) SetWorkScheduler(s LoadScheduler)

func (*BaseController) SetWorkerThreadCount

func (c *BaseController) SetWorkerThreadCount(threads int)

Set the thread count of workers processing the local queue. This has to be defined before starting the controller

func (*BaseController) SetWorkqueue

func (c *BaseController) SetWorkqueue(w workqueue.Interface)

func (*BaseController) WaitForCacheSync

func (c *BaseController) WaitForCacheSync(stopCh <-chan struct{}) error

Override this method if you need to wait for other informers aswell

type DelayingWorkqueueController

type DelayingWorkqueueController struct {
	ShardedController
}

func NewDelayingWorkqueueController

func NewDelayingWorkqueueController(ctx context.Context, informer cache.SharedIndexInformer, kubeClient *kubernetes.Clientset, name string, resyncPeriod time.Duration, queue workqueue.DelayingInterface) *DelayingWorkqueueController

func (*DelayingWorkqueueController) GetDelayingWorkqueue

func (dwq *DelayingWorkqueueController) GetDelayingWorkqueue() (workqueue.DelayingInterface, error)

type LoadScheduler

type LoadScheduler interface {
	// contains filtered or unexported methods
}

LoadScheduler probvides enqueue method to only enqueue objects it is suited for.

type RateLimitingWorkqueueController

type RateLimitingWorkqueueController struct {
	ShardedController
}

func NewRateLimitingWorkqueueController

func NewRateLimitingWorkqueueController(ctx context.Context, informer cache.SharedIndexInformer, kubeClient *kubernetes.Clientset, name string, resyncPeriod time.Duration, rateLimiter workqueue.RateLimiter) *RateLimitingWorkqueueController

func (*RateLimitingWorkqueueController) GetRateLimitingWorkqueue

func (rlwq *RateLimitingWorkqueueController) GetRateLimitingWorkqueue() (workqueue.RateLimitingInterface, error)

type Reconciler

type Reconciler interface {
	Reconcile(objName string) error
}

Reconciler required Reconcile method.

type ShardedController

type ShardedController struct {
	BaseController
	LoadScheduler
	// contains filtered or unexported fields
}

func NewShardedController

func NewShardedController(ctx context.Context, informer cache.SharedIndexInformer, kubeclient *kubernetes.Clientset, name string, resyncPeriod time.Duration) *ShardedController

func (*ShardedController) RunSharded

func (c *ShardedController) RunSharded(stopCh <-chan struct{}, statefulSetName microservices.MicroService) error

RunSharded will start a sharded controller that watches the parent StatefulSet and applies sharding based on the total replica count

Jump to

Keyboard shortcuts

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