Skip to content

Commit

Permalink
Rename InitialBufferSize with minBufferSize, do not export it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Sirianni committed Mar 1, 2021
1 parent 323c153 commit bd9528e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions operator/builtin/input/tcp/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
)

const (
// InitialBufferSize is the initial size used for buffering
// minBufferSize is the initial size used for buffering
// TCP input
InitialBufferSize = 64*1024
minBufferSize = 64*1024

// DefaultMaxBufferSize is the max buffer sized used
// if MaxBufferSize is not set
Expand Down Expand Up @@ -70,8 +70,8 @@ func (c TCPInputConfig) Build(context operator.BuildContext) ([]operator.Operato
c.MaxBufferSize = DefaultMaxBufferSize
}

if c.MaxBufferSize < InitialBufferSize {
return nil, fmt.Errorf("invalid value for parameter 'max_buffer_size', must be equal to or greater than %d bytes", InitialBufferSize)
if c.MaxBufferSize < minBufferSize {
return nil, fmt.Errorf("invalid value for parameter 'max_buffer_size', must be equal to or greater than %d bytes", minBufferSize)
}

if c.ListenAddress == "" {
Expand Down

0 comments on commit bd9528e

Please sign in to comment.