Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Series ¶
func Series(s ...*SeriesObject) map[string][]*SeriesObject
Types ¶
type MetricLineItem ¶
type MetricLineItem struct {
Id int `json:"id"`
Time string `json:"time"`
Value float64 `json:"value"`
}
func AvgMetricLine ¶
func AvgMetricLine(src []MetricLineItem) (target []MetricLineItem)
func SumMetricLine ¶
func SumMetricLine(src []MetricLineItem) (target []MetricLineItem)
type NameValuePair ¶
func NewNameValuePair ¶
func NewNameValuePair(name string, value int64) *NameValuePair
func (*NameValuePair) Incr ¶
func (d *NameValuePair) Incr()
type SeriesObject ¶
type SeriesObject struct {
Type string
Data interface{}
// contains filtered or unexported fields
}
func NewSeriesObject ¶
func NewSeriesObject(Type string) *SeriesObject
func (*SeriesObject) MarshalJSON ¶
func (d *SeriesObject) MarshalJSON() ([]byte, error)
func (*SeriesObject) SetAttr ¶
func (d *SeriesObject) SetAttr(key string, value interface{})
type TimeValues ¶
type TimeValues struct {
// contains filtered or unexported fields
}
func NewTimeValues ¶
func NewTimeValues() *TimeValues
func (*TimeValues) AddData ¶
func (tv *TimeValues) AddData(time int64, value interface{})
func (*TimeValues) MarshalJSON ¶
func (tv *TimeValues) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.