Help us shape the future of Go! Take the 2026 Go Developer Survey

scopebridge

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package scopebridge lets one external-client implementation serve both API scopes of a Kind. The cluster-scoped and namespaced variants of a Kind carry the same forProvider and atProvider schema, so the namespaced external client is the cluster one wrapped in a conversion at the boundary.

The inner client reads the spec and writes metadata and status. Spec changes it makes are not copied back: the cluster-scoped form cannot represent every namespaced spec field (a NamespacedReference carries a namespace), and no external client in this provider writes its spec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type External

type External[N resource.ModernManaged, C resource.LegacyManaged] struct {
	// contains filtered or unexported fields
}

External serves a namespaced managed resource N with an external client written for its cluster-scoped twin C.

func New

func New[N resource.ModernManaged, C resource.LegacyManaged](inner managed.ExternalClient, newCluster func() C) *External[N, C]

New wraps inner, which operates on C, so it can reconcile N. newCluster returns an empty C.

func (*External[N, C]) Create

func (e *External[N, C]) Create(ctx context.Context, mg resource.Managed) (managed.ExternalCreation, error)

Create implements managed.ExternalClient.

func (*External[N, C]) Delete

func (e *External[N, C]) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error)

Delete implements managed.ExternalClient.

func (*External[N, C]) Disconnect

func (e *External[N, C]) Disconnect(ctx context.Context) error

Disconnect implements managed.ExternalClient.

func (*External[N, C]) Observe

Observe implements managed.ExternalClient.

func (*External[N, C]) Update

func (e *External[N, C]) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error)

Update implements managed.ExternalClient.

Jump to

Keyboard shortcuts

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