Skip to content

feat(go): shared microinit IPC client - #5

Closed
keskad wants to merge 2 commits into
mainfrom
feat/go-client
Closed

feat(go): shared microinit IPC client#5
keskad wants to merge 2 commits into
mainfrom
feat/go-client

Conversation

@keskad

@keskad keskad commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Go module github.com/dcc-bigfred/microinit/go with client package (List/Status/Control/Shutdown/FollowLogs, ValidateName, FormatLogLine).
  • Tag as go/v0.1.0 for consumers (bigfred, bigfred-os-ui).

Test plan

  • cd go && go test ./client/...
  • Consumers can go get github.com/dcc-bigfred/microinit/go@go/v0.1.0

Made with Cursor

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]>
- 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]>
@keskad

keskad commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #6 (config + supervise SDK includes the shared IPC client).

@keskad keskad closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant