reconciler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Reconcile(k any) (*Result, error)
}

controller interface meant for registering to database manager for processing changes inoccuring to varies entries in the database

type Manager

type Manager interface {
	// function to get all existing keys in the collection
	ReconcilerGetAllKeys() []any
	// contains filtered or unexported methods
}

Manager interface for enforcing implementation of specific functions

type ManagerImpl

type ManagerImpl struct {
	Manager
	// contains filtered or unexported fields
}

Manager implementation with implementation of the core logic typically built over and above database store on which it will offer reconcilation capabilities

func (*ManagerImpl) Initialize

func (m *ManagerImpl) Initialize(ctx context.Context, parent Manager) error

Initialize the manager with context and relevant collection to work with

func (*ManagerImpl) NotifyCallback

func (m *ManagerImpl) NotifyCallback(wKey any)

callback registered with the data store

func (*ManagerImpl) Register

func (m *ManagerImpl) Register(name string, crtl Controller) error

register a controller with manager for reconciliation

type Pipeline

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

Pipeline of elements to be processed by reconciler upon notification

func NewPipeline

func NewPipeline(ctx context.Context, fn reconcilerFunc) *Pipeline

Creates a New Pipeline for queuing up and processing entries provided for reconciliation

func (*Pipeline) Enqueue

func (p *Pipeline) Enqueue(k any) error

type Request

type Request struct {
	Key any
}

type Result

type Result struct {
	// RequeueAfter if greater than 0, tells the Controller to requeue the reconcile key after the Duration.
	RequeueAfter time.Duration
}

Taking motivation from kubernetes https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/reconcile/reconcile.go enable a reconciler function

Jump to

Keyboard shortcuts

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