Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultIdleConnectionTimeout = 90 * time.Second
Variables ¶
View Source
var (
BackoffError error = fmt.Errorf("backpressure is needed")
)
Functions ¶
This section is empty.
Types ¶
type HTTPWriter ¶
type HTTPWriter struct {
// contains filtered or unexported fields
}
HTTPWriter is a Writer that writes to an InfluxDB HTTP server.
func NewHTTPWriter ¶
func NewHTTPWriter(c HTTPWriterConfig) *HTTPWriter
NewHTTPWriter returns a new HTTPWriter from the supplied HTTPWriterConfig.
func (*HTTPWriter) WriteLineProtocol ¶
func (w *HTTPWriter) WriteLineProtocol(body []byte) (int64, error)
WriteLineProtocol writes the given byte slice to the HTTP server described in the Writer's HTTPWriterConfig. It returns the latency in nanoseconds and any error received while sending the data over HTTP, or it returns a new error if the HTTP response isn't as expected.
type HTTPWriterConfig ¶
type HTTPWriterConfig struct { // URL of the host, in form "http://example.com:8086" Host string // Name of the target database into which points will be written. Database string BackingOffChan chan bool BackingOffDone chan struct{} // Debug label for more informative errors. DebugInfo string }
HTTPWriterConfig is the configuration used to create an HTTPWriter.
Click to show internal directories.
Click to hide internal directories.