Documentation ¶
Index ¶
- Constants
- type WFStatusRecorder
- type WavefrontConfig
- func (w *WavefrontConfig) ConfigureSender() error
- func (wc *WavefrontConfig) WrapFastHTTPRequest(f fasthttp.RequestHandler) fasthttp.RequestHandler
- func (wc *WavefrontConfig) WrapHTTPHandle(f httprouter.Handle) httprouter.Handle
- func (wc *WavefrontConfig) WrapHandlerFunc(f http.HandlerFunc) http.HandlerFunc
Constants ¶
View Source
const ( // ErrCreateSender in case any errors occur while creating the Wavefront Direct Sender ErrCreateSender = "error creating wavefront sender: %s" // DebugServerName has the server name to set when you want to print things to the log instead of sending data to Wavefront DebugServerName = "debug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WFStatusRecorder ¶
type WFStatusRecorder struct { http.ResponseWriter // contains filtered or unexported fields }
func (*WFStatusRecorder) WriteHeader ¶
func (rec *WFStatusRecorder) WriteHeader(code int)
type WavefrontConfig ¶
type WavefrontConfig struct { // Wavefront URL of the form https://<INSTANCE>.wavefront.com. // Setting the server to debug will print the metrics to a log instead of sending them to Wavefront Server string // Wavefront API token with direct data ingestion permission. Token string // Max batch of data sent per flush interval. BatchSize int // Max batch of data sent per flush interval. MaxBufferSize int // Interval (in seconds) at which to flush data to Wavefront. FlushInterval int // Map of Key-Value pairs (strings) associated with each data point sent to Wavefront. PointTags map[string]string // Name of the app that emits metrics. Source string // Prefix added to all metrics MetricPrefix string }
WavefrontConfig configures the direct ingestion sender to Wavefront.
func (*WavefrontConfig) ConfigureSender ¶
func (w *WavefrontConfig) ConfigureSender() error
ConfigureSender ...
func (*WavefrontConfig) WrapFastHTTPRequest ¶ added in v0.3.0
func (wc *WavefrontConfig) WrapFastHTTPRequest(f fasthttp.RequestHandler) fasthttp.RequestHandler
WrapFastHTTPRequest is the wrapper needed for use with the fasthttp project (https://github.com/valyala/fasthttp)
func (*WavefrontConfig) WrapHTTPHandle ¶ added in v0.2.0
func (wc *WavefrontConfig) WrapHTTPHandle(f httprouter.Handle) httprouter.Handle
WrapHTTPHandle is the wrapper needed for use with the httprouter project (https://github.com/julienschmidt/httprouter)
func (*WavefrontConfig) WrapHandlerFunc ¶
func (wc *WavefrontConfig) WrapHandlerFunc(f http.HandlerFunc) http.HandlerFunc
WrapHandlerFunc is the wrapper needed for use with the net/http package
Click to show internal directories.
Click to hide internal directories.