Documentation
¶
Index ¶
- func InitializeOwner(ctx context.Context, store db.Store, name string) error
- func InitializeOwnerTableDefault(ctx context.Context, client db.StoreClient, name string) error
- func InitializeOwnerWithUpdateInterval(ctx context.Context, store db.Store, name string, interval time.Duration) error
- type Lock
- type LockTable
- type Provider
- type ProviderTable
- func (t *ProviderTable) Callback(op string, wKey interface{})
- func (t *ProviderTable) CreateProvider(ctx context.Context, extKey any) (*Provider, error)
- func (t *ProviderTable) GetProviderList() []any
- func (t *ProviderTable) IsProviderAvailable(key any) bool
- func (t *ProviderTable) Register(name string, crtl reconciler.Controller) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeOwner ¶
Initialize the Sync Owner management constructs, anyone while working with this library requires to use this function before actually start consuming any functionality from here. Also it is callers responsibility to ensure providing uniform store definition for all the consuming processes to ensure synchronisation to work in a seemless manner
func InitializeOwnerTableDefault ¶
Initialize the Sync Owner management constructs, anyone while working with this library requires to use this function before actually start consuming any functionality from here. This function falls back to using the default database, ensuring common definition for all the consuming processes to ensure synchronisation to work in a seemless manner
func InitializeOwnerWithUpdateInterval ¶
func InitializeOwnerWithUpdateInterval(ctx context.Context, store db.Store, name string, interval time.Duration) error
Initialize the Owner management constructs, anyone while working with this library requires to use this function before actually start consuming any functionality from here. This also allows specifying the interval to ensuring configurability Also it is callers responsibility to ensure providing uniform store definition for all the consuming processes to ensure synchronisation to work in a seemless manner
Types ¶
type LockTable ¶
type LockTable[K any] struct { // contains filtered or unexported fields }
func LocateLockTable ¶
LocateLockTable
type ProviderTable ¶
type ProviderTable struct {
// contains filtered or unexported fields
}
func LocateProviderTable ¶
func LocateProviderTable(store db.Store) (*ProviderTable, error)
Locate Provider table with pre-specified table name while working out of standard provider table
func LocateProviderTableWithName ¶
func LocateProviderTableWithName(store db.Store, name string) (*ProviderTable, error)
Locate Provider table with specific table name meant for consumers want to work out of non standard Provider tables
func (*ProviderTable) Callback ¶
func (t *ProviderTable) Callback(op string, wKey interface{})
Provider Table callback function, currently meant for clearing providers once the owner corresponding to those providers no longer exists eventually we will handle observers also as part of this
func (*ProviderTable) CreateProvider ¶
create provider based on the specified key, typically a string, Returns Provider handle, allowing to close the provider
func (*ProviderTable) GetProviderList ¶
func (t *ProviderTable) GetProviderList() []any
Get List of Providers
func (*ProviderTable) IsProviderAvailable ¶
func (t *ProviderTable) IsProviderAvailable(key any) bool
Checks if provider exists
func (*ProviderTable) Register ¶
func (t *ProviderTable) Register(name string, crtl reconciler.Controller) error
Allow a reconciler controller to register and get notified for availability and unavailability of providers