feat: add ConnTimeout option, improve GenId entropy and refine logging - #18
Merged
Conversation
options.go / transport.go: - Add field (default 10s) to Options for configuring TCP dial timeout independently from the overall request - Pass to socket dialer instead of hard-coded value - Add doc note warning that unix:// path is session-level only stat.go / trace.go / response.go / request.go: - Refactor Stat struct fields and Print/String output format - Add response body truncation in LogS (cap at 1024 chars) and drop redundant json.Marshal path; use a2s helper uniformly uid.go: - Switch GenId from nanosecond to microsecond precision multiplied by 1000 to cleanly separate time bits from random bits, reducing collision risk under high concurrency while staying within uint64 util.go: - Remove unused encoding/json import - Simplify LogS body logging via a2s helper with 1024-byte truncation requests_test.go / request_test.go / response_test.go / stat_test.go: - Update and extend tests to cover new fields, LogS truncation, GenId uniqueness, and revised Stat output format
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.
options.go / transport.go:
stat.go / trace.go / response.go / request.go:
uid.go:
util.go:
requests_test.go / request_test.go / response_test.go / stat_test.go: