diff options
| author | 2026-03-28 19:58:37 +0000 | |
|---|---|---|
| committer | 2026-03-28 19:58:37 +0000 | |
| commit | ea8373ed78113af57315ae4523d42dfed3a3b1fe (patch) | |
| tree | 835f98905046a8e5564cf6057af450fe03035444 /network/protocol/pktline/encoder.go | |
| parent | common/iowrap: Add io wrappers (diff) | |
| signature | No signature | |
network, internal/progress, format/packfile/ingest: Use WriteFlusher
Diffstat (limited to 'network/protocol/pktline/encoder.go')
| -rw-r--r-- | network/protocol/pktline/encoder.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/network/protocol/pktline/encoder.go b/network/protocol/pktline/encoder.go index b4c6dbf0..3d92ca19 100644 --- a/network/protocol/pktline/encoder.go +++ b/network/protocol/pktline/encoder.go @@ -3,26 +3,20 @@ package pktline import ( "fmt" "io" -) -// WriteFlusher is the output transport contract required by Encoder. -// -// Write emits framed bytes and Flush pushes buffered transport state. -type WriteFlusher interface { - io.Writer - Flush() error -} + "codeberg.org/lindenii/furgit/common/iowrap" +) // Encoder writes pkt-line frames to a flush-capable output transport. // // It writes exactly one frame per method call and does not auto-chunk data. type Encoder struct { - w WriteFlusher + w iowrap.WriteFlusher maxData int } // NewEncoder creates an encoder over w. -func NewEncoder(w WriteFlusher) *Encoder { +func NewEncoder(w iowrap.WriteFlusher) *Encoder { return &Encoder{ w: w, maxData: LargePacketDataMax, |
