-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix passing options to logscribe consumer #2254
Conversation
WalkthroughWalkthroughThe changes involve modifying the invocation of the Changes
Sequence Diagram(s)sequenceDiagram
participant Main
participant LogscribeConsumer
Main->>LogscribeConsumer: Start(ctx, WithStoreService("identifier"))
LogscribeConsumer-->>Main: Success/Error
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- node/cmd/api/main.go (1 hunks)
- node/cmd/boot_api/main.go (1 hunks)
- node/cmd/dal/main.go (1 hunks)
- node/cmd/delegator/main.go (1 hunks)
- node/cmd/node/main.go (1 hunks)
- node/cmd/por/main.go (1 hunks)
- node/cmd/reporter/main.go (1 hunks)
- node/cmd/sentinel/main.go (1 hunks)
- node/pkg/logscribeconsumer/app.go (1 hunks)
Additional comments not posted (10)
node/cmd/por/main.go (1)
14-14
: LGTM!The change enhances the flexibility of the
Start
function by allowing it to accept configuration options. This is a positive change as it makes the function more modular and extensible.The code changes are approved.
node/cmd/dal/main.go (1)
15-15
: LGTM!The change enhances the flexibility of the
Start
function by allowing it to accept configuration options. This is a positive change as it makes the function more modular and extensible.The code changes are approved.
node/cmd/boot_api/main.go (1)
15-15
: LGTM!The change enhances the flexibility of the
Start
function by allowing it to accept configuration options. This is a positive change as it makes the function more modular and extensible.The code changes are approved.
node/cmd/reporter/main.go (1)
19-19
: LGTM! But verify the function usage in the codebase.The change enhances flexibility by allowing more structured configuration options. Ensure that all function calls to
logscribeconsumer.Start
match the new signature.The code changes are approved.
Run the following script to verify the function usage:
Verification successful
Verification Successful: All instances of
logscribeconsumer.Start
use the new signature.The function
logscribeconsumer.Start
is consistently used with thelogscribeconsumer.WithStoreService
option across the codebase, ensuring the new signature is correctly implemented.
- Files verified include
main.go
insentinel
,reporter
,por
,node
,delegator
,dal
,boot_api
, andapi
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `logscribeconsumer.Start` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go -A 5 $'logscribeconsumer.Start'Length of output: 2619
node/cmd/delegator/main.go (1)
31-31
: LGTM! But verify the function usage in the codebase.The change enhances flexibility by allowing more structured configuration options. Ensure that all function calls to
logscribeconsumer.Start
match the new signature.The code changes are approved.
Run the following script to verify the function usage:
Verification successful
Function usage verified successfully.
All instances of
logscribeconsumer.Start
in the codebase match the new signature withlogscribeconsumer.WithStoreService
. No discrepancies were found.
- Files with updated usage:
node/cmd/node/main.go
node/cmd/sentinel/main.go
node/cmd/reporter/main.go
node/cmd/por/main.go
node/cmd/delegator/main.go
node/cmd/boot_api/main.go
node/cmd/dal/main.go
node/cmd/api/main.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `logscribeconsumer.Start` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go -A 5 $'logscribeconsumer.Start'Length of output: 2619
node/cmd/api/main.go (1)
32-35
: LGTM! But verify the function usage in the codebase.The change enhances flexibility by allowing more structured configuration options. Ensure that all function calls to
logscribeconsumer.Start
match the new signature.The code changes are approved.
Run the following script to verify the function usage:
Verification successful
Function usage verified successfully.
All instances of
logscribeconsumer.Start
in the codebase use the new signature withlogscribeconsumer.WithStoreService
, confirming consistent application of the change.
node/cmd/reporter/main.go
node/cmd/sentinel/main.go
node/cmd/por/main.go
node/cmd/node/main.go
node/cmd/delegator/main.go
node/cmd/api/main.go
node/cmd/boot_api/main.go
node/cmd/dal/main.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `logscribeconsumer.Start` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go -A 5 $'logscribeconsumer.Start'Length of output: 2619
node/cmd/node/main.go (1)
24-24
: LGTM!The update to use functional options in the
logscribeconsumer.Start
function call enhances flexibility and aligns with common patterns in Go for managing options.The code changes are approved.
node/cmd/sentinel/main.go (1)
26-26
: LGTM!The update to use functional options in the
logscribeconsumer.Start
function call enhances flexibility and aligns with common patterns in Go for managing options.The code changes are approved.
node/pkg/logscribeconsumer/app.go (2)
97-99
: LGTM!The update to the
Start
function signature to accept variadic parameters of typeAppOption
enhances flexibility and aligns with common patterns in Go for managing options.The code changes are approved.
99-99
: LGTM!The update to utilize the new options parameter in the instantiation of the App object enhances flexibility and aligns with common patterns in Go for managing options.
The code changes are approved.
Description
allow customizing important params, service, logscribe endpoing, buffer size, etc., from logscribe consumer
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment