|
@@ -30,9 +30,9 @@ type customLimit struct {
|
30
|
30
|
}
|
31
|
31
|
|
32
|
32
|
// LimiterConfig controls the automated connection limits.
|
33
|
|
-// RawLimiterConfig contains all the YAML-visible fields;
|
|
33
|
+// rawLimiterConfig contains all the YAML-visible fields;
|
34
|
34
|
// LimiterConfig contains additional denormalized private fields
|
35
|
|
-type RawLimiterConfig struct {
|
|
35
|
+type rawLimiterConfig struct {
|
36
|
36
|
Limit bool
|
37
|
37
|
MaxConcurrent int `yaml:"max-concurrent-connections"`
|
38
|
38
|
|
|
@@ -50,7 +50,7 @@ type RawLimiterConfig struct {
|
50
|
50
|
}
|
51
|
51
|
|
52
|
52
|
type LimiterConfig struct {
|
53
|
|
- RawLimiterConfig
|
|
53
|
+ rawLimiterConfig
|
54
|
54
|
|
55
|
55
|
ipv4Mask net.IPMask
|
56
|
56
|
ipv6Mask net.IPMask
|
|
@@ -59,7 +59,7 @@ type LimiterConfig struct {
|
59
|
59
|
}
|
60
|
60
|
|
61
|
61
|
func (config *LimiterConfig) UnmarshalYAML(unmarshal func(interface{}) error) (err error) {
|
62
|
|
- if err = unmarshal(&config.RawLimiterConfig); err != nil {
|
|
62
|
+ if err = unmarshal(&config.rawLimiterConfig); err != nil {
|
63
|
63
|
return err
|
64
|
64
|
}
|
65
|
65
|
return config.postprocess()
|