resolver

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	// LookupRESTMapping returns the RESTMapping for the workload type. The rest mapping contains a GroupVersionResource which can
	// be used to fetch the workload mapping.
	LookupRESTMapping(ctx context.Context, obj runtime.Object) (*meta.RESTMapping, error)

	// LookupWorkloadMapping the mapping template for the workload. Typically a ClusterWorkloadResourceMapping is defined for the
	//  workload's fully qualified resource `{resource}.{group}`.
	LookupWorkloadMapping(ctx context.Context, gvr schema.GroupVersionResource) (*servicebindingv1.ClusterWorkloadResourceMappingSpec, error)

	// LookupBindingSecret returns the binding secret name exposed by the service following the Provisioned Service duck-type
	// (`.status.binding.name`). If a direction binding is used (where the referenced service is itself a Secret) the referenced Secret is
	// returned without a lookup.
	LookupBindingSecret(ctx context.Context, serviceBinding *servicebindingv1.ServiceBinding) (string, error)

	// LookupWorkloads returns the referenced objects. Often a unstructured Object is used to sidestep issues with schemes and registered
	// types. The selector is mutually exclusive with the reference name. The UID of the ServiceBinding is used to find resources that
	// may have been previously bound but no longer match the query.
	LookupWorkloads(ctx context.Context, serviceBinding *servicebindingv1.ServiceBinding) ([]runtime.Object, error)
}

func New

func New(client client.Client) Resolver

New creates a new resolver backed by a controller-runtime client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳