-
Notifications
You must be signed in to change notification settings - Fork 18
Description
For two primary reasons, when using the apb.Spec type, you cannot serialize it to YAML and use that as contents for a valid apb.yml file.
Missing Name
The Name field is missing from the struct, but it is an important field. It would need to be added.
Contains non-spec data
The following fields are not part of the spec, but they are contained in this type.
FQName - this is generated based on the name of the image and the registry it was found in when discovered by a registry adapter
id - this is generated by the broker after discovery
runtime - this is part of a separate label and is not part of the APB specification
It seems like this struct is really a combination of two different types of data. It might make sense to separate them. There would be:
Spec- a service bundle spec. Nothing less, nothing more.- Other data from the discovery process.
The "other data" is sort of like an envelope. Maybe something like this would be appropriate?
type DiscoveredSpec struct {
Spec *apb.Spec
FQName string
ID string
Runtime int
}