File tree 3 files changed +10
-11
lines changed
3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,20 @@ import (
9
9
)
10
10
11
11
const (
12
- DefaultMaxReconnect = 3
12
+ DefaultMaxReconnect = 3
13
13
DefaultReconnectDelay = 1
14
14
)
15
15
16
16
type TCPWriter struct {
17
17
GelfWriter
18
- mu sync.Mutex
19
- MaxReconnect int
18
+ mu sync.Mutex
19
+ MaxReconnect int
20
20
ReconnectDelay time.Duration
21
21
}
22
22
23
23
func NewTCPWriter (addr string ) (* TCPWriter , error ) {
24
24
var err error
25
25
w := new (TCPWriter )
26
- w .CompressionType = CompressNone
27
26
w .MaxReconnect = DefaultMaxReconnect
28
27
w .ReconnectDelay = DefaultReconnectDelay
29
28
w .proto = "tcp"
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ import (
20
20
21
21
type UDPWriter struct {
22
22
GelfWriter
23
+ CompressionLevel int // one of the consts from compress/flate
24
+ CompressionType CompressType
23
25
}
24
26
25
27
// What compression type the writer should use when sending messages
Original file line number Diff line number Diff line change @@ -18,13 +18,11 @@ type Writer interface {
18
18
// messages to a graylog2 server, or data from a stream-oriented
19
19
// interface (like the functions in log).
20
20
type GelfWriter struct {
21
- addr string
22
- conn net.Conn
23
- hostname string
24
- Facility string // defaults to current process name
25
- proto string
26
- CompressionLevel int // one of the consts from compress/flate
27
- CompressionType CompressType
21
+ addr string
22
+ conn net.Conn
23
+ hostname string
24
+ Facility string // defaults to current process name
25
+ proto string
28
26
}
29
27
30
28
// Close connection and interrupt blocked Read or Write operations
You can’t perform that action at this time.
0 commit comments