Function
newStreamSink
(httpClient *client.Client, patchRunID string, full *strings.Builder)
Source from the content-addressed store, hash-verified
| 2069 | } |
| 2070 | |
| 2071 | func 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. |
Tested by
no test coverage detected