Documentation ¶
Overview ¶
Package splunk sends log data to a splunk server.
Index ¶
Constants ¶
View Source
const ( // DialTimeout limits how long a write will block // while dialing the splunk server. Assuming the // connection stays open for a long time, this will // happen only rarely. DialTimeout = 50 * time.Millisecond // WriteTimeout limits how long a write will block // sending data on the network. It is deliberately // very small, so that writes can only be satisfied // by the local network buffers. It should never // block waiting for a TCP ACK for an appreciable // amount of time. WriteTimeout = 100 * time.Microsecond )
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new writer that sends data to the given TCP address. It connects on the first call to Write, and attempts to reconnect when necessary, with a timeout of DialTimeout.
Every write has a timeout of WriteTimeout. If the write doesn't complete in that time, the writer drops the unwritten data. For every contiguous run of dropped data, it writes dropmsg before resuming ordinary writes. As long as the remote endpoint can keep up with the averate data rate and the local network buffers in the kernel and NIC are big enough to hold traffic bursts, no data will be lost.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.