go fmt
This commit is contained in:
parent
a27e5ea92e
commit
e523deb15c
10
conn.go
10
conn.go
@ -107,8 +107,8 @@ func (wa websocketAddr) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type rateLimiter struct {
|
type rateLimiter struct {
|
||||||
C <-chan struct{}
|
C <-chan struct{}
|
||||||
ticker *time.Ticker
|
ticker *time.Ticker
|
||||||
stopped chan struct{}
|
stopped chan struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,8 +135,8 @@ func newRateLimiter(delay time.Duration, burst int) *rateLimiter {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return &rateLimiter{
|
return &rateLimiter{
|
||||||
C: ch,
|
C: ch,
|
||||||
ticker: ticker,
|
ticker: ticker,
|
||||||
stopped: stopped,
|
stopped: stopped,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ func (rl *rateLimiter) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type connOptions struct {
|
type connOptions struct {
|
||||||
Logger Logger
|
Logger Logger
|
||||||
RateLimitDelay time.Duration
|
RateLimitDelay time.Duration
|
||||||
RateLimitBurst int
|
RateLimitBurst int
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ func connectToUpstream(network *network) (*upstreamConn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
options := connOptions{
|
options := connOptions{
|
||||||
Logger: logger,
|
Logger: logger,
|
||||||
RateLimitDelay: upstreamMessageDelay,
|
RateLimitDelay: upstreamMessageDelay,
|
||||||
RateLimitBurst: upstreamMessageBurst,
|
RateLimitBurst: upstreamMessageBurst,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user