Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(pts []lineprotocol.Point, c write.Client, cfg WriteConfig) (uint64, time.Duration)
Write takes in a slice of lineprotocol.Points, a write.Client, and a WriteConfig. It will attempt to write data to the target until one of the following conditions is met. 1. We reach that MaxPoints specified in the WriteConfig. 2. We've passed the Deadline specified in the WriteConfig.
Types ¶
type WriteConfig ¶
type WriteConfig struct { BatchSize uint64 MaxPoints uint64 // If 0 (NoCompression), do not gzip at all. // Otherwise, pass this value to the gzip writer. GzipLevel int Deadline time.Time Tick <-chan time.Time Results chan<- WriteResult }
WriteConfig specifies the configuration for the Write function.
Click to show internal directories.
Click to hide internal directories.