Skip to content
Permalink
f1c82f89a8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
36 lines (28 sloc) 871 Bytes
// Code generated by github.com/actgardner/gogen-avro. DO NOT EDIT.
/*
* SOURCE:
* datapackage.avsc
*/
package avro
import (
"io"
)
type MetricData struct {
Metric string
Datapoints []*DataPoint
}
func DeserializeMetricData(r io.Reader) (*MetricData, error) {
return readMetricData(r)
}
func NewMetricData() *MetricData {
v := &MetricData{
Datapoints: make([]*DataPoint, 0),
}
return v
}
func (r *MetricData) Schema() string {
return "{\"fields\":[{\"name\":\"metric\",\"type\":\"string\"},{\"name\":\"datapoints\",\"type\":{\"items\":{\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\"},{\"name\":\"value\",\"type\":[\"long\",\"double\"]}],\"name\":\"DataPoint\",\"type\":\"record\"},\"type\":\"array\"}}],\"name\":\"MetricData\",\"type\":\"record\"}"
}
func (r *MetricData) Serialize(w io.Writer) error {
return writeMetricData(r, w)
}