Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new --enable-osctrld flag to toggle the registration of osctrld-related endpoints in the TLS service.
- Introduce
Osctrldfield inServiceFlagParamsand wire it into CLI flags - Append
initOsctrldFlagsto TLS flag initialization - Conditionally register osctrld handlers in
osctrlServicebased on the flag
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/config/flags.go | Added Osctrld flag, initOsctrldFlags, and hooked it into InitTLSFlags |
| cmd/tls/main.go | Wrapped osctrld endpoint handlers behind flagParams.Osctrld with a log message |
Comments suppressed due to low confidence (2)
pkg/config/flags.go:69
- [nitpick] Consider renaming
OsctrldtoEnableOsctrldto clearly indicate it’s a boolean flag and align with other fields likeTLSServerandDebugHTTPValues.Enabled.
Osctrld bool
cmd/tls/main.go:297
- No tests were added to verify that osctrld endpoints are registered only when the flag is enabled. Add unit or integration tests to cover both flag-enabled and flag-disabled scenarios.
if flagParams.Osctrld {
Usage string more precise and consistent Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the flag
--enable-osctrldto enable theosctrldendpoints inosctrl-tls. By default, they are disabled.