apireconciler

package
v0.20.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func IndexAPIExportsByAPIResourceSchemas

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

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

func IndexSyncTargetsByExports

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,
	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

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