generic

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const REQUEUE_PERIOD = 5 * time.Second

Variables

This section is empty.

Functions

func NewGenericStatusSyncController

func NewGenericStatusSyncController(mgr ctrl.Manager, logName string, producer transport.Producer,
	orderedBundleCollection []*BundleCollectionEntry, createObjFunc CreateObjectFunction, predicate predicate.Predicate,
	resolveSyncIntervalFunc config.ResolveSyncIntervalFunc,
) error

NewGenericStatusSyncController creates a new instance of genericStatusSyncController and adds it to the manager.

Types

type BundleCollectionEntry

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

BundleCollectionEntry holds information about a specific bundle.

func NewBundleCollectionEntry

func NewBundleCollectionEntry(transportBundleKey string, bundle statusbundle.Bundle,
	predicate func() bool,
) *BundleCollectionEntry

NewBundleCollectionEntry creates a new instance of BundleCollectionEntry.

type CreateObjectFunction

type CreateObjectFunction func() bundle.Object

CreateObjectFunction is a function for how to create an object that is stored inside the bundle.

type HybridSyncManager added in v0.7.0

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

hybridSyncManager manages two BundleCollectionEntry instances in application of hybrid-sync mode. won't get collected by the GC since callbacks are used.

func NewHybridSyncManager

func NewHybridSyncManager(log logr.Logger, completeStateBundleCollectionEntry *BundleCollectionEntry,
	deltaStateBundleCollectionEntry *BundleCollectionEntry,
) (*HybridSyncManager, error)

NewHybridSyncManager creates a manager that manages two BundleCollectionEntry instances that wrap a complete-state bundle and a delta-state bundle.

func (*HybridSyncManager) GetBundleCollectionEntry added in v0.7.0

func (manager *HybridSyncManager) GetBundleCollectionEntry(syncMode bundle.BundleSyncMode) *BundleCollectionEntry

func (*HybridSyncManager) SetHybridModeCallBack added in v0.7.0

func (manager *HybridSyncManager) SetHybridModeCallBack(deltaCountSwitchFactor int, transportObj producer.Producer)

Jump to

Keyboard shortcuts

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