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 ¶
- type External
- func (e *External[N, C]) Create(ctx context.Context, mg resource.Managed) (managed.ExternalCreation, error)
- func (e *External[N, C]) Delete(ctx context.Context, mg resource.Managed) (managed.ExternalDelete, error)
- func (e *External[N, C]) Disconnect(ctx context.Context) error
- func (e *External[N, C]) Observe(ctx context.Context, mg resource.Managed) (managed.ExternalObservation, error)
- func (e *External[N, C]) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error)
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 ¶
Disconnect implements managed.ExternalClient.