apireconciler

package
v0.11.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName                     = "kcp-virtual-syncer-api-reconciler-"
	IndexSyncTargetsByExport           = ControllerName + "ByExport"
	IndexAPIExportsByAPIResourceSchema = ControllerName + "ByAPIResourceSchema"
)

Variables

This section is empty.

Functions

func IndexAPIExportsByAPIResourceSchemas added in v0.10.0

func IndexAPIExportsByAPIResourceSchemas(obj interface{}) ([]string, error)

IndexAPIExportsByAPIResourceSchemas is an index function that maps an APIExport to its spec.latestResourceSchemas.

func IndexSyncTargetsByExports added in v0.10.0

func IndexSyncTargetsByExports(obj interface{}) ([]string, error)

Types

type APIReconciler

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

APIReconciler is a controller watching APIExports, APIResourceSchemas and SyncTargets, and updates the API definitions driving the virtual workspace.

func NewAPIReconciler

func NewAPIReconciler(
	virtualWorkspaceName string,
	kcpClusterClient kcpclientset.ClusterInterface,
	syncTargetInformer workloadv1alpha1informers.SyncTargetClusterInformer,
	apiResourceSchemaInformer apisv1alpha1informers.APIResourceSchemaClusterInformer,
	apiExportInformer apisv1alpha1informers.APIExportClusterInformer,
	createAPIDefinition CreateAPIDefinitionFunc,
	allowedAPIfilter AllowedAPIfilterFunc,
) (*APIReconciler, error)

func (*APIReconciler) GetAPIDefinitionSet

func (*APIReconciler) ShutDown

func (c *APIReconciler) ShutDown()

func (*APIReconciler) Start

func (c *APIReconciler) Start(ctx context.Context)

type AllowedAPIfilterFunc added in v0.10.0

type AllowedAPIfilterFunc func(apiGroupResource schema.GroupResource) bool

type CreateAPIDefinitionFunc

type CreateAPIDefinitionFunc func(syncTargetWorkspace logicalcluster.Name, syncTargetName string, apiResourceSchema *apisv1alpha1.APIResourceSchema, version string, identityHash string) (apidefinition.APIDefinition, error)

Jump to

Keyboard shortcuts

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