-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(http): add listen method to http server #29
Conversation
Warning Rate limit exceeded@amimart has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 7 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant Listener
Client->>Server: Initiate Listen(addr)
Server->>Listener: Start TCP Listener on addr
Listener-->>Server: Listening for connections
Server->>Server: Start HTTP Server
Server->>Listener: Wait for errors or shutdown signals
Listener-->>Server: Error or SIGINT/SIGTERM
Server->>Listener: Close listener gracefully
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 using PR comments)
Other keywords and placeholders
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.
👍
Codecov ReportAttention: Patch coverage is
|
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: 4
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- http/server.go (2 hunks)
Additional context used
GitHub Check: codecov/patch
http/server.go
[warning] 51-54: http/server.go#L51-L54
Added lines #L51 - L54 were not covered by tests
[warning] 57-60: http/server.go#L57-L60
Added lines #L57 - L60 were not covered by tests
[warning] 62-63: http/server.go#L62-L63
Added lines #L62 - L63 were not covered by tests
[warning] 65-70: http/server.go#L65-L70
Added lines #L65 - L70 were not covered by tests
GitHub Check: lint-go
http/server.go
[failure] 59-59:
G114: Use of net/http serve function that has no support for setting timeouts (gosec)
79d6bb3
to
d2d1fc3
Compare
d2d1fc3
to
74fceda
Compare
Allow the http server to be served on a specified listen address.
Details
Through the
func (s *Server) Listen() error
method, runs the server listening on the address configured.This operation is blocking until either an interruption (i.e. through
SIGINT
orSIGTERM
) or an error occurred, returning it if any.