edge: add JSON/CSV/Unix-socket output sinks#3523
Draft
armcconnell wants to merge 1 commit intoedge/1-parser-frameworkfrom
Draft
edge: add JSON/CSV/Unix-socket output sinks#3523armcconnell wants to merge 1 commit intoedge/1-parser-frameworkfrom
armcconnell wants to merge 1 commit intoedge/1-parser-frameworkfrom
Conversation
Introduces the OutputSink interface and three implementations:
- JSONFileSink — JSON lines to a file
- CSVFileSink — CSV with a header row inferred from the first
record; rows pivot the parser's flat Fields map onto stable
columns so every record type lines up in one sheet
- SocketSink — broadcast to all clients connected to a Unix
domain socket, with drop-on-slow-consumer semantics so a stuck
reader can't backpressure the parser
NewSink is a factory keyed on Format ("json"/"csv") and Path. Paths
starting with "unix://" route to SocketSink; everything else is a
regular file.
Sinks take []Record from the parser (introduced in the previous
commit). The parser still knows nothing about sinks — this package
stays a decode library.
This was referenced Apr 11, 2026
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.
Part 2 of 4 — edge feed parser stack
Draft until #3522 lands. Reviewers welcome to read for context; I'll mark ready-for-review after rebasing onto main.
Summary
Testing Verification