Przeglądaj źródła

unexport rawLimiterConfig

tags/v2.0.0-rc1
Shivaram Lingamneni 4 lat temu
rodzic
commit
42db1778ac

+ 4
- 4
irc/connection_limits/limiter.go Wyświetl plik

@@ -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()

+ 1
- 1
irc/connection_limits/limiter_test.go Wyświetl plik

@@ -18,7 +18,7 @@ func easyParseIP(ipstr string) (result net.IP) {
18 18
 }
19 19
 
20 20
 var baseConfig = LimiterConfig{
21
-	RawLimiterConfig: RawLimiterConfig{
21
+	rawLimiterConfig: rawLimiterConfig{
22 22
 		Limit:         true,
23 23
 		MaxConcurrent: 4,
24 24
 

+ 1
- 1
irc/connection_limits/throttler_test.go Wyświetl plik

@@ -66,7 +66,7 @@ func makeTestThrottler(v4len, v6len int) *Limiter {
66 66
 	minute, _ := time.ParseDuration("1m")
67 67
 	maxConnections := 3
68 68
 	config := LimiterConfig{
69
-		RawLimiterConfig: RawLimiterConfig{
69
+		rawLimiterConfig: rawLimiterConfig{
70 70
 			Limit:        false,
71 71
 			Throttle:     true,
72 72
 			CidrLenIPv4:  v4len,

Ładowanie…
Anuluj
Zapisz