Skip to content

Commit

Permalink
Distinguish v2 catalog Protocol unset from default (#18612)
Browse files Browse the repository at this point in the history
Even though we intend to default to TCP when this field is not
explicitly provided, uncluding an `UNSPECIFIED` default enum value allows us
to create inheritance chains, e.g. service to workload.
  • Loading branch information
zalimeni authored Aug 29, 2023
1 parent 797e42d commit f8812ed
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 51 deletions.
90 changes: 47 additions & 43 deletions proto-public/pbcatalog/v1alpha1/protocol.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions proto-public/pbcatalog/v1alpha1/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ syntax = "proto3";
package hashicorp.consul.catalog.v1alpha1;

enum Protocol {
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
PROTOCOL_TCP = 0;
PROTOCOL_HTTP = 1;
PROTOCOL_HTTP2 = 2;
PROTOCOL_GRPC = 3;
PROTOCOL_UNSPECIFIED = 0;
PROTOCOL_TCP = 1;
PROTOCOL_HTTP = 2;
PROTOCOL_HTTP2 = 3;
PROTOCOL_GRPC = 4;

// Protocol Mesh indicates that this port can speak Consul's mTLS based mesh protocol.
PROTOCOL_MESH = 4;
PROTOCOL_MESH = 5;
}
2 changes: 1 addition & 1 deletion proto-public/pbcatalog/v1alpha1/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto-public/pbcatalog/v1alpha1/workload.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8812ed

Please sign in to comment.