backend

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IBackend

type IBackend interface {
	GetBackendObject() client.Object
	// todo: discussion: maybe Fork can be replaced by Create/Delete, and using Create/Delete to check if ready or deleted
	ForkStable(stableName, controllerName string) client.Object
	ForkCanary(canaryName, controllerName string) client.Object
}

type Registry

type Registry interface {
	// SetupWithManger initialize registry with manager.
	SetupWithManger(mgr manager.Manager)
	// Register add a new backend store for given gvk
	Register(store Store)
	// Delete delete a backend store for given gvk
	Delete(gvk schema.GroupVersionKind)
	// If the gvk is registered and supported by all member clusters, Get returns the backend rest store.
	Get(gvk schema.GroupVersionKind) (Store, error)
}

type Store

type Store interface {
	GroupVersionKind() schema.GroupVersionKind
	// NewObject returns a new instance of the backend type
	NewObject() client.Object
	// Wrap get a client.Object and returns a backend interface
	Wrap(cluster string, obj client.Object) (IBackend, error)
	// Get returns a wrapped backend interface
	Get(ctx context.Context, cluster, namespace, name string) (IBackend, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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