Versions in this module Expand all Collapse all v0 v0.3.5 Dec 3, 2024 Changes in this version + const DefaultPingInterval + const DefaultStatusUpdateInterval + var ErrConflictingLeaseControllerConfiguration = pkgerrors.New("Multiple, conflicting lease configurations have been put into place") + type ErrorHandler func(context.Context, error) error + type NodeController struct + func NewNodeController(p NodeProvider, node *corev1.Node, client client.Client, ...) (*NodeController, error) + func (n *NodeController) Done() <-chan struct{} + func (n *NodeController) Err() error + func (n *NodeController) Ready() <-chan struct{} + func (n *NodeController) Run(ctx context.Context) (retErr error) + type NodeControllerOpt func(*NodeController) error + func WithNodeStatusUpdateErrorHandler(h ErrorHandler) NodeControllerOpt + type NodeProvider interface + NotifyNodeStatus func(ctx context.Context, cb func(*corev1.Node)) + Ping func(context.Context) error + type PodController struct + func NewPodController(cfg PodControllerConfig) (*PodController, error) + func (pc *PodController) AddKnownPod(pod *corev1.Pod) + func (pc *PodController) CheckAndUpdatePodStatus(ctx context.Context, key string, newPod *corev1.Pod) + func (pc *PodController) DeleteKnownPod(key string) + func (pc *PodController) DeletePodsFromKubernetesEnqueue(ctx context.Context, key string) + func (pc *PodController) DeletePodsFromKubernetesForget(ctx context.Context, key string) + func (pc *PodController) Done() <-chan struct{} + func (pc *PodController) Err() error + func (pc *PodController) GetKnownPod(key string) (any, bool) + func (pc *PodController) Ready() <-chan struct{} + func (pc *PodController) Run(ctx context.Context, podSyncWorkers int) (retErr error) + func (pc *PodController) SyncPodStatusFromProviderEnqueue(ctx context.Context, key string) + func (pc *PodController) SyncPodsFromKubernetesEnqueue(ctx context.Context, key string) + type PodControllerConfig struct + Cache cache.Cache + Client client.Client + DeletePodsFromKubernetesRateLimiter workqueue.RateLimiter + DeletePodsFromKubernetesShouldRetryFunc queue.ShouldRetryFunc + EventRecorder record.EventRecorder + NodeName string + Provider PodLifecycleHandler + SyncPodStatusFromProviderRateLimiter workqueue.RateLimiter + SyncPodStatusFromProviderShouldRetryFunc queue.ShouldRetryFunc + SyncPodsFromKubernetesRateLimiter workqueue.RateLimiter + SyncPodsFromKubernetesShouldRetryFunc queue.ShouldRetryFunc + type PodEventFilterFunc func(context.Context, *corev1.Pod) bool + type PodLifecycleHandler interface + CreatePod func(ctx context.Context, pod *corev1.Pod) error + DeletePod func(ctx context.Context, pod *corev1.Pod) error + GetPod func(ctx context.Context, namespace, name string) (*corev1.Pod, error) + GetPodStatus func(ctx context.Context, pod *corev1.Pod, bizStatus model.BizStatusData) (*corev1.PodStatus, error) + GetPods func(context.Context) ([]*corev1.Pod, error) + UpdatePod func(ctx context.Context, pod *corev1.Pod) error + type PodNotifier interface + NotifyPods func(context.Context, func(*corev1.Pod))