aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 03:50:31 +0000
committerGravatar Runxi Yu2026-03-29 03:50:31 +0000
commitb6d6d077d4b28c2dcc644baadcfbc35e44f37a32 (patch)
tree037b213ec371a33d19dd91ddb9d38676ef43eed6 /network
parentnetwork/protocol: Constructors get Life-Parent too (diff)
signatureNo signature
network: Fix labels
Diffstat (limited to 'network')
-rw-r--r--network/protocol/pktline/chunk_writer.go2
-rw-r--r--network/protocol/pktline/decoder.go2
-rw-r--r--network/protocol/pktline/encoder.go2
-rw-r--r--network/protocol/sideband64k/chunk_writer.go2
-rw-r--r--network/protocol/sideband64k/decoder.go2
-rw-r--r--network/protocol/sideband64k/encoder.go2
-rw-r--r--network/protocol/v0v1/server/receivepack/session.go6
-rw-r--r--network/protocol/v0v1/server/session.go8
8 files changed, 21 insertions, 5 deletions
diff --git a/network/protocol/pktline/chunk_writer.go b/network/protocol/pktline/chunk_writer.go
index 3c9d409a..f009978e 100644
--- a/network/protocol/pktline/chunk_writer.go
+++ b/network/protocol/pktline/chunk_writer.go
@@ -4,6 +4,8 @@ import "io"
// ChunkWriter packetizes arbitrary stream bytes into data pkt-lines.
// It never writes control packets automatically.
+//
+// Labels: MT-Unsafe.
type ChunkWriter struct {
enc *Encoder
}
diff --git a/network/protocol/pktline/decoder.go b/network/protocol/pktline/decoder.go
index 15cab63d..682dd164 100644
--- a/network/protocol/pktline/decoder.go
+++ b/network/protocol/pktline/decoder.go
@@ -17,6 +17,8 @@ type ReadOptions struct {
// It is advisable to supply a buffered reader.
//
// It preserves frame boundaries and supports one-frame lookahead via PeekFrame.
+//
+// Labels: MT-Unsafe.
type Decoder struct {
r io.Reader
maxData int
diff --git a/network/protocol/pktline/encoder.go b/network/protocol/pktline/encoder.go
index ab8bb823..a7b17108 100644
--- a/network/protocol/pktline/encoder.go
+++ b/network/protocol/pktline/encoder.go
@@ -10,6 +10,8 @@ import (
// 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.
+//
+// Labels: MT-Unsafe.
type Encoder struct {
w iowrap.WriteFlusher
maxData int
diff --git a/network/protocol/sideband64k/chunk_writer.go b/network/protocol/sideband64k/chunk_writer.go
index a1a0ec8c..78c66edf 100644
--- a/network/protocol/sideband64k/chunk_writer.go
+++ b/network/protocol/sideband64k/chunk_writer.go
@@ -6,6 +6,8 @@ import "io"
// for one fixed band.
//
// It never writes control packets automatically.
+//
+// Labels: MT-Unsafe.
type ChunkWriter struct {
enc *Encoder
band Band
diff --git a/network/protocol/sideband64k/decoder.go b/network/protocol/sideband64k/decoder.go
index 6fc48cd8..e34f5d12 100644
--- a/network/protocol/sideband64k/decoder.go
+++ b/network/protocol/sideband64k/decoder.go
@@ -17,6 +17,8 @@ type ReadOptions struct {
//
// It preserves frame boundaries and supports one-frame lookahead via
// PeekFrame.
+//
+// Labels: MT-Unsafe.
type Decoder struct {
dec *pktline.Decoder
maxData int
diff --git a/network/protocol/sideband64k/encoder.go b/network/protocol/sideband64k/encoder.go
index 0c6ea090..6cdef38a 100644
--- a/network/protocol/sideband64k/encoder.go
+++ b/network/protocol/sideband64k/encoder.go
@@ -10,6 +10,8 @@ import (
// Encoder writes side-band-64k frames to a flush-capable output transport.
//
// It writes exactly one frame per method call and does not auto-chunk data.
+//
+// Labels: MT-Unsafe.
type Encoder struct {
enc *pktline.Encoder
maxData int
diff --git a/network/protocol/v0v1/server/receivepack/session.go b/network/protocol/v0v1/server/receivepack/session.go
index c367ed70..65fa6b36 100644
--- a/network/protocol/v0v1/server/receivepack/session.go
+++ b/network/protocol/v0v1/server/receivepack/session.go
@@ -10,6 +10,8 @@ import (
)
// Session is one stateful server-side receive-pack protocol session.
+//
+// Labels: MT-Unsafe.
type Session struct {
base *common.Session
supported Capabilities
@@ -171,7 +173,7 @@ func (session *Session) WriteProgress(p []byte) error {
//
// When side-band-64k was not negotiated, writes are discarded.
//
-// Labels: Life-Parent, Close-No.
+// Labels: Life-Parent.
func (session *Session) ProgressWriter() iowrap.WriteFlusher {
return session.base.ProgressWriter()
}
@@ -185,7 +187,7 @@ func (session *Session) WriteError(p []byte) error {
//
// When side-band-64k was not negotiated, writes are discarded.
//
-// Labels: Life-Parent, Close-No.
+// Labels: Life-Parent.
func (session *Session) ErrorWriter() iowrap.WriteFlusher {
return session.base.ErrorWriter()
}
diff --git a/network/protocol/v0v1/server/session.go b/network/protocol/v0v1/server/session.go
index 5d00b373..a66cc37a 100644
--- a/network/protocol/v0v1/server/session.go
+++ b/network/protocol/v0v1/server/session.go
@@ -18,6 +18,8 @@ type Options struct {
}
// Session is one stateful server-side v0/v1 server protocol session.
+//
+// Labels: MT-Unsafe.
type Session struct {
dec *pktline.Decoder
enc *pktline.Encoder
@@ -103,7 +105,7 @@ func (session *Session) Flush() error {
//
// When side-band-64k was not negotiated, writes are discarded.
//
-// Labels: Life-Parent, Close-No.
+// Labels: Life-Parent.
func (session *Session) ProgressWriter() iowrap.WriteFlusher {
if !session.useSideBand {
return iowrap.NopFlush(io.Discard)
@@ -116,7 +118,7 @@ func (session *Session) ProgressWriter() iowrap.WriteFlusher {
//
// When side-band-64k was not negotiated, writes are discarded.
//
-// Labels: Life-Parent, Close-No.
+// Labels: Life-Parent.
func (session *Session) ErrorWriter() iowrap.WriteFlusher {
if !session.useSideBand {
return iowrap.NopFlush(io.Discard)
@@ -130,7 +132,7 @@ func (session *Session) ErrorWriter() iowrap.WriteFlusher {
// When side-band-64k is enabled, writes are chunked into band-1 sideband
// frames. Otherwise writes are chunked into direct pkt-line data frames.
//
-// Labels: Life-Parent, Close-No.
+// Labels: Life-Parent.
func (session *Session) PrimaryDataWriter() iowrap.WriteFlusher {
if session.useSideBand {
return sideband64k.NewChunkWriter(session.sideband, sideband64k.BandData)