consul/agent/config
Matt Keeler 085c0addc0
Protobuf Refactoring for Multi-Module Cleanliness (#16302)
Protobuf Refactoring for Multi-Module Cleanliness

This commit includes the following:

Moves all packages that were within proto/ to proto/private
Rewrites imports to account for the packages being moved
Adds in buf.work.yaml to enable buf workspaces
Names the proto-public buf module so that we can override the Go package imports within proto/buf.yaml
Bumps the buf version dependency to 1.14.0 (I was trying out the version to see if it would get around an issue - it didn't but it also doesn't break things and it seemed best to keep up with the toolchain changes)

Why:

In the future we will need to consume other protobuf dependencies such as the Google HTTP annotations for openapi generation or grpc-gateway usage.
There were some recent changes to have our own ratelimiting annotations.
The two combined were not working when I was trying to use them together (attempting to rebase another branch)
Buf workspaces should be the solution to the problem
Buf workspaces means that each module will have generated Go code that embeds proto file names relative to the proto dir and not the top level repo root.
This resulted in proto file name conflicts in the Go global protobuf type registry.
The solution to that was to add in a private/ directory into the path within the proto/ directory.
That then required rewriting all the imports.

Is this safe?

AFAICT yes
The gRPC wire protocol doesn't seem to care about the proto file names (although the Go grpc code does tack on the proto file name as Metadata in the ServiceDesc)
Other than imports, there were no changes to any generated code as a result of this.
2023-02-17 16:14:46 -05:00
..
testdata Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
agent_limits.go config: validate system limits against limits.http_max_conns_per_client (#7434) 2020-04-02 09:22:17 +02:00
builder.go Bump x/time to 0.3.0 and fix related breakage linked to RPCRateLimit (#16241) 2023-02-13 11:11:51 -06:00
builder_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
builder_oss_test.go Rename `master` and `agent_master` ACL tokens in the config file format (#11665) 2021-12-01 21:08:14 +00:00
builder_test.go fix: return error when config file with unknown extension is passed (#15107) 2023-01-04 16:57:00 -08:00
config.go Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
config_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
default.go Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
default_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
deprecated.go Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
deprecated_test.go Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
doc.go
file_watcher.go Regenerate files according to 1.19.2 formatter 2022-10-24 16:12:08 -04:00
file_watcher_test.go add a rate limiter to config auto-reload (#12490) 2022-04-04 11:31:39 -04:00
flags.go Deprecate -join and -join-wan (#15598) 2022-12-14 20:28:25 +00:00
flags_test.go Deprecate -join and -join-wan (#15598) 2022-12-14 20:28:25 +00:00
flagset.go
golden_test.go removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
limits.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
limits_windows.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
merge.go Agent Auto Configuration: Configuration Syntax Updates (#8003) 2020-06-16 15:03:22 -04:00
merge_test.go Deprecate -join and -join-wan (#15598) 2022-12-14 20:28:25 +00:00
ratelimited_file_watcher.go add a rate limiter to config auto-reload (#12490) 2022-04-04 11:31:39 -04:00
ratelimited_file_watcher_test.go add a rate limiter to config auto-reload (#12490) 2022-04-04 11:31:39 -04:00
runtime.go Adding experimental support for a more efficient LogStore implementation (#16176) 2023-02-08 16:50:22 +00:00
runtime_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
runtime_oss_test.go update config defaults, add docs (#15302) 2022-11-09 09:29:55 -08:00
runtime_test.go Protobuf Refactoring for Multi-Module Cleanliness (#16302) 2023-02-17 16:14:46 -05:00
segment_oss.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
segment_oss_test.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00