Documentation ¶
Index ¶
Constants ¶
View Source
const (
EmptyString = ""
)
Variables ¶
This section is empty.
Functions ¶
func NewOpentsdbPublisher ¶
func NewOpentsdbPublisher() *opentsdbPublisher
NewOpentsdbPublisher returns an instance of the OpenTSDB publisher
Types ¶
type DataPoint ¶
type DataPoint struct { Metric StringValue `json:"metric"` Timestamp int64 `json:"timestamp"` Value interface{} `json:"value"` Tags map[string]StringValue `json:"tags"` }
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(url string, timeout time.Duration) *HttpClient
NewClient creates an instance of HttpClient which times out at the givin duration.
func (*HttpClient) Post ¶
func (hc *HttpClient) Post(dps []DataPoint) error
Post stores slides of Datapoint to OpenTSDB
type StringValue ¶
type StringValue string
StringValue implements Json interface to replece invalid characters.
func (StringValue) MarshalJSON ¶
func (sv StringValue) MarshalJSON() ([]byte, error)
func (*StringValue) UnmarshalJSON ¶
func (sv *StringValue) UnmarshalJSON(json []byte) error
Click to show internal directories.
Click to hide internal directories.