Documentation
¶
Overview ¶
Package adapter implements the ServiceUnit resolution Adapter.
This file owns the Adapter — a thin struct wrapper around resolve.ResolveServiceUnit. The Adapter exists to satisfy interface-based injection points in the application layer where a concrete resolution dependency must be passed as a value rather than called as a free function.
Current deps are intentionally empty — client and logger will be added here when resolution requires cross-CR reads or observability hooks. Until then, resolution is pure and stateless so no deps are needed.
See also:
- resolution/serviceunit/resolve — resolution entry point and types
- resolution/serviceunit/contract — one-way proto projection
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
}
Adapter wraps the ServiceUnit resolution function for interface-based injection. Stateless — all resolution logic lives in ResolveServiceUnit.
Planned future deps (add when needed):
- client client.Client — for cross-CR reads during resolution.
- log logr.Logger — for resolution observability.
func NewAdapter ¶
func NewAdapter() *Adapter
NewAdapter constructs a stateless ServiceUnit resolution Adapter.
func (*Adapter) Resolve ¶
func (a *Adapter) Resolve( ctx context.Context, serviceunit *environmentv1alpha1.ServiceUnit, ) (*resolve.ResolvedServiceUnit, error)
Resolve delegates to ResolveServiceUnit, returning the resolved ServiceUnit contract or an error if the CR spec fails validation.