feat(go): shared microinit IPC client - #5
Closed
keskad wants to merge 2 commits into
Closed
Conversation
Provide github.com/dcc-bigfred/microinit/go/client so bigfred and bigfred-os-ui can share one length-prefixed JSON Unix socket client. Co-authored-by: Cursor <[email protected]>
2 tasks
- readFrame: stream-decode via LimitReader+json.Decoder instead of pre-allocating the full declared frame (DoS on a 16MiB header). - Response: add stable `code` field; map on it in responseError instead of substring-matching the human message (not_found/disabled), with a legacy fallback for older servers that do not send a code. - FollowLogs: add Client.ReadTimeout + ReadFrame enforcing a per-frame idle read-deadline so a silent server is detected, not blocked forever. - tests: readFrame too-large, code mapping (+legacy fallback), read-deadline, streaming decode. Co-authored-by: Cursor <[email protected]>
Contributor
Author
|
Superseded by #6 (config + supervise SDK includes the shared IPC client). |
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.
Summary
github.com/dcc-bigfred/microinit/gowithclientpackage (List/Status/Control/Shutdown/FollowLogs, ValidateName, FormatLogLine).go/v0.1.0for consumers (bigfred,bigfred-os-ui).Test plan
cd go && go test ./client/...go get github.com/dcc-bigfred/microinit/go@go/v0.1.0Made with Cursor