Documentation
¶
Index ¶
Constants ¶
View Source
const ( Okay = iota Warning Critical Unknown )
DDServiceCheck Status values
View Source
const ( AlertError = AlertType("error") AlertWarning = AlertType("warning") AlertInfo = AlertType("info") AlertSuccess = AlertType("success") )
DDEvent AlertType values
View Source
const ( PriorityNormal = Priority("normal") PriorityLow = Priority("low") )
DDEvent Priority values
View Source
const ( Count = "count" Rate = "rate" Gauge = "gauge" )
DDMetric Type values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { SendSeries(*DDMetricSeries) error SendServiceCheck(*DDServiceCheck) error SendEvent(*DDEvent) error SetHTTPClient(HTTPClient) }
type DDApiResponse ¶
type DDApiResponse struct {
Errors []string `json:"errors"`
}
type DDClient ¶
type DDClient struct {
// contains filtered or unexported fields
}
func NewDDClient ¶
func (*DDClient) SendSeries ¶
func (c *DDClient) SendSeries(series *DDMetricSeries) error
func (*DDClient) SendServiceCheck ¶
func (c *DDClient) SendServiceCheck(check *DDServiceCheck) error
func (*DDClient) SetHTTPClient ¶
func (c *DDClient) SetHTTPClient(client HTTPClient)
type DDEvent ¶
type DDEvent struct { AggregationKey string `json:"aggregation_key"` AlertType AlertType `json:"alert_type"` DateHappened int64 `json:"date_happened"` DeviceName string `json:"device_name"` Host string `json:"host"` Priority Priority `json:"priority"` RelatedEventID int64 `json:"related_event_id"` SourceTypeName string `json:"source_type_name"` Tags []string `json:"tags"` Title string `json:"title"` }
type DDMetricSeries ¶
type DDMetricSeries struct {
Series []*DDMetric `json:"series"`
}
type DDServiceCheck ¶
type HTTPClient ¶
Click to show internal directories.
Click to hide internal directories.