MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / newStreamSink

Function newStreamSink

agent-source-code/cmd/patchmon-agent/commands/serve.go:2071–2080  ·  view source on GitHub ↗
(httpClient *client.Client, patchRunID string, full *strings.Builder)

Source from the content-addressed store, hash-verified

2069}
2070
2071func newStreamSink(httpClient *client.Client, patchRunID string, full *strings.Builder) *streamSink {
2072 return &streamSink{
2073 client: httpClient,
2074 patchRunID: patchRunID,
2075 full: full,
2076 lastFlush: time.Now(),
2077 flushEvery: 250 * time.Millisecond,
2078 flushBytes: 1024,
2079 }
2080}
2081
2082// Write records bytes into both the fullOutput builder and the pending flush
2083// buffer. It triggers a flush when thresholds are reached.

Callers 1

runPatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected