Skip to content

Commit

Permalink
Parse YAML as inline + fix default value
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
  • Loading branch information
ycombinator and adriansr committed Sep 17, 2020
1 parent 90e6015 commit c7e967b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbeat/processors/dns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

// Config defines the configuration options for the DNS processor.
type Config struct {
CacheConfig
CacheConfig `config:",inline"`
Nameservers []string `config:"nameservers"` // Required on Windows. /etc/resolv.conf is used if none are given.
Timeout time.Duration `conifg:"timeout"` // Per request timeout (with 2 nameservers the total timeout would be 2x).
Type string `config:"type" validate:"required"` // Reverse is the only supported type currently.
Expand Down Expand Up @@ -89,7 +89,7 @@ type CacheSettings struct {
TTL time.Duration `config:"ttl"`

// Minimum TTL value for successful DNS responses.
MinTTL time.Duration `config:"min_ttl" validate:"min=1"`
MinTTL time.Duration `config:"min_ttl" validate:"min=1ns"`

// Initial capacity. How much space is allocated at initialization.
InitialCapacity int `config:"capacity.initial" validate:"min=0"`
Expand Down

0 comments on commit c7e967b

Please sign in to comment.