Skip to content

Commit 2ac82d3

Browse files
committed
fix(lint): add missing public docs
Signed-off-by: dankeboy36 <[email protected]>
1 parent e2e70f2 commit 2ac82d3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

buffering.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import (
2424
"time"
2525
)
2626

27+
// BufferConfig controls how bytes coming from the board (port) are aggregated
28+
// into larger chunks before being written to the TCP client. All fields are
29+
// optional; invalid or zero values are normalized to sensible defaults via
30+
// normalized().
2731
type BufferConfig struct {
2832
HighWaterMark int // >= 1
2933
FlushInterval time.Duration // 0 to disable time-based flush
@@ -57,8 +61,11 @@ func (c BufferConfig) normalized() BufferConfig {
5761
return cfg
5862
}
5963

64+
// Option is a functional option used to configure a Server at construction time.
6065
type Option func(*Server)
6166

67+
// WithBufferConfig sets the Server's buffering behavior. The provided cfg is
68+
// normalized (e.g., min values enforced) before being stored on the Server.
6269
func WithBufferConfig(cfg BufferConfig) Option {
6370
return func(s *Server) {
6471
s.bufCfg = cfg.normalized()

0 commit comments

Comments
 (0)