Documentation
¶
Overview ¶
Package contract owns the proto projection for ServiceUnit — the one-way projection from the resolved runtime spec (resolve.ResolvedServiceUnitSpec) to the protobuf contract type (environmentscontractv1alpha1.ServiceUnitSpec).
ResolvedServiceUnitSpec.Type is commoncontractv1.ServiceUnitType_ServiceUnitType (the nested enum value). The contract field ServiceUnitSpec.Type is *v1.ServiceUnitType (the wrapper message). toServiceUnitTypeWrapper bridges the two — the type switch operates on the enum value, not the wrapper.
⚠️ ONE-WAY adapter. Controllers must NEVER consume the returned value.
See also:
- resolution/serviceunit/resolve — resolution entry point and types
- resolution/serviceunit/adapter — interface wrapper
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToServiceUnitContract ¶
func ToServiceUnitContract(s *resolve.ResolvedServiceUnitSpec) *environmentscontractv1alpha1.ServiceUnitSpec
ToServiceUnitContract projects the resolved runtime ServiceUnit spec into a protobuf environmentscontractv1alpha1.ServiceUnitSpec for infrastructure consumers (hashing, diffing, storage, audit).
⚠️ ONE-WAY adapter. The returned value MUST NOT be fed back into any controller or domain logic path.
Types ¶
This section is empty.