Documentation ¶
Index ¶
- Constants
- Variables
- func FastFormatAppend(v interface{}, buf []byte) []byte
- func SerializerTest(t *testing.T, cases []SerializeCase, ps PointSerializer)
- func TestPointDefault() *data.Point
- func TestPointInt() *data.Point
- func TestPointMultiField() *data.Point
- func TestPointNoTags() *data.Point
- func TestPointWithNilField() *data.Point
- func TestPointWithNilTag() *data.Point
- type ErrWriter
- type PointSerializer
- type SerializeCase
Constants ¶
View Source
const ( TestFloat = float64(38.24311829) TestInt = 38 TestInt64 = int64(5000000000) ErrWriterAlwaysErr = "bad write: I always error" ErrWriterSometimesErr = "bad write: I sometimes error" )
Variables ¶
View Source
var ( TestNow = time.Unix(1451606400, 0) TestMeasurement = []byte("cpu") TestTagKeys = [][]byte{[]byte("hostname"), []byte("region"), []byte("datacenter")} TestTagVals = []interface{}{"host_0", "eu-west-1", "eu-west-1b"} TestColFloat = []byte("usage_guest_nice") TestColInt = []byte("usage_guest") TestColInt64 = []byte("big_usage_guest") )
Functions ¶
func FastFormatAppend ¶
Utility function for appending various data types to a byte string
func SerializerTest ¶
func SerializerTest(t *testing.T, cases []SerializeCase, ps PointSerializer)
func TestPointDefault ¶
func TestPointInt ¶
func TestPointMultiField ¶
func TestPointNoTags ¶
func TestPointWithNilField ¶
func TestPointWithNilTag ¶
Types ¶
type PointSerializer ¶
PointSerializer serializes a Point for writing
Click to show internal directories.
Click to hide internal directories.