Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async config block & concurrent readers to UDP input operator #27647

Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
  • Loading branch information
hovavza and djaglowski authored Oct 13, 2023
commit 3453ed68832b1b7a3c1307f024021e65a7e11e6f
4 changes: 2 additions & 2 deletions pkg/stanza/operator/input/udp/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) {
resolver = helper.NewIPResolver()
}

if c.AsyncConfig == (UdpAsyncConfig{}) {
if c.AsyncConfig == nil {
c.AsyncConfig = NewUdpAsyncConfig()
}

if c.AsyncConfig.FixedReaderRoutineCount <= 0 {
return nil, fmt.Errorf("AsyncConfig.FixedReaderRoutineCount must be bigger than 0")
return nil, fmt.Errorf("async. fixed_reader_routine_count must be greater than 0")
}

udpInput := &Input{
Expand Down