binary

package
v1.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package binary is a generated protocol buffer package.

It is generated from these files:

binary.proto

It has these top-level messages:

Header
BucketHeader
BucketFooter
FloatPoints
IntegerPoints
UnsignedPoints
BooleanPoints
StringPoints
SeriesHeader
SeriesFooter

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBinary = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBinary   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrWriteAfterClose       = errors.New("format/binary: write after close")
	ErrWriteBucketAfterClose = errors.New("format/binary: write to closed bucket")
)
View Source
var FieldType_name = map[int32]string{
	0: "FLOAT",
	1: "INTEGER",
	2: "UNSIGNED",
	3: "BOOLEAN",
	4: "STRING",
}
View Source
var FieldType_value = map[string]int32{
	"FLOAT":    0,
	"INTEGER":  1,
	"UNSIGNED": 2,
	"BOOLEAN":  3,
	"STRING":   4,
}
View Source
var Header_Version_name = map[int32]string{
	0: "VERSION_0",
}
View Source
var Header_Version_value = map[string]int32{
	"VERSION_0": 0,
}
View Source
var (
	Magic = [...]byte{0x49, 0x46, 0x4c, 0x58, 0x44, 0x55, 0x4d, 0x50} // IFLXDUMP
)

Functions

This section is empty.

Types

type BooleanPoints

type BooleanPoints struct {
	Timestamps []int64 `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []bool  `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*BooleanPoints) Descriptor

func (*BooleanPoints) Descriptor() ([]byte, []int)

func (*BooleanPoints) Marshal

func (m *BooleanPoints) Marshal() (dAtA []byte, err error)

func (*BooleanPoints) MarshalTo

func (m *BooleanPoints) MarshalTo(dAtA []byte) (int, error)

func (*BooleanPoints) ProtoMessage

func (*BooleanPoints) ProtoMessage()

func (*BooleanPoints) Reset

func (m *BooleanPoints) Reset()

func (*BooleanPoints) Size

func (m *BooleanPoints) Size() (n int)

func (*BooleanPoints) String

func (m *BooleanPoints) String() string

func (*BooleanPoints) Unmarshal

func (m *BooleanPoints) Unmarshal(dAtA []byte) error

type BucketFooter

type BucketFooter struct {
}

func (*BucketFooter) Descriptor

func (*BucketFooter) Descriptor() ([]byte, []int)

func (*BucketFooter) Marshal

func (m *BucketFooter) Marshal() (dAtA []byte, err error)

func (*BucketFooter) MarshalTo

func (m *BucketFooter) MarshalTo(dAtA []byte) (int, error)

func (*BucketFooter) ProtoMessage

func (*BucketFooter) ProtoMessage()

func (*BucketFooter) Reset

func (m *BucketFooter) Reset()

func (*BucketFooter) Size

func (m *BucketFooter) Size() (n int)

func (*BucketFooter) String

func (m *BucketFooter) String() string

func (*BucketFooter) Unmarshal

func (m *BucketFooter) Unmarshal(dAtA []byte) error

type BucketHeader

type BucketHeader struct {
	Start int64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"`
	End   int64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"`
}

func (*BucketHeader) Descriptor

func (*BucketHeader) Descriptor() ([]byte, []int)

func (*BucketHeader) Marshal

func (m *BucketHeader) Marshal() (dAtA []byte, err error)

func (*BucketHeader) MarshalTo

func (m *BucketHeader) MarshalTo(dAtA []byte) (int, error)

func (*BucketHeader) ProtoMessage

func (*BucketHeader) ProtoMessage()

func (*BucketHeader) Reset

func (m *BucketHeader) Reset()

func (*BucketHeader) Size

func (m *BucketHeader) Size() (n int)

func (*BucketHeader) String

func (m *BucketHeader) String() string

func (*BucketHeader) Unmarshal

func (m *BucketHeader) Unmarshal(dAtA []byte) error

type FieldType

type FieldType int32
const (
	FloatFieldType    FieldType = 0
	IntegerFieldType  FieldType = 1
	UnsignedFieldType FieldType = 2
	BooleanFieldType  FieldType = 3
	StringFieldType   FieldType = 4
)

func (FieldType) EnumDescriptor

func (FieldType) EnumDescriptor() ([]byte, []int)

func (FieldType) String

func (x FieldType) String() string

type FloatPoints

type FloatPoints struct {
	Timestamps []int64   `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []float64 `protobuf:"fixed64,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*FloatPoints) Descriptor

func (*FloatPoints) Descriptor() ([]byte, []int)

func (*FloatPoints) Marshal

func (m *FloatPoints) Marshal() (dAtA []byte, err error)

func (*FloatPoints) MarshalTo

func (m *FloatPoints) MarshalTo(dAtA []byte) (int, error)

func (*FloatPoints) ProtoMessage

func (*FloatPoints) ProtoMessage()

func (*FloatPoints) Reset

func (m *FloatPoints) Reset()

func (*FloatPoints) Size

func (m *FloatPoints) Size() (n int)

func (*FloatPoints) String

func (m *FloatPoints) String() string

func (*FloatPoints) Unmarshal

func (m *FloatPoints) Unmarshal(dAtA []byte) error
type Header struct {
	Version         Header_Version `protobuf:"varint,1,opt,name=version,proto3,enum=binary.Header_Version" json:"version,omitempty"`
	Database        string         `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
	RetentionPolicy string         `protobuf:"bytes,3,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"`
	ShardDuration   time.Duration  `protobuf:"varint,4,opt,name=shard_duration,json=shardDuration,proto3,stdduration" json:"shard_duration,omitempty"`
}

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

type Header_Version

type Header_Version int32
const (
	Version0 Header_Version = 0
)

func (Header_Version) EnumDescriptor

func (Header_Version) EnumDescriptor() ([]byte, []int)

func (Header_Version) String

func (x Header_Version) String() string

type IntegerPoints

type IntegerPoints struct {
	Timestamps []int64 `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []int64 `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*IntegerPoints) Descriptor

func (*IntegerPoints) Descriptor() ([]byte, []int)

func (*IntegerPoints) Marshal

func (m *IntegerPoints) Marshal() (dAtA []byte, err error)

func (*IntegerPoints) MarshalTo

func (m *IntegerPoints) MarshalTo(dAtA []byte) (int, error)

func (*IntegerPoints) ProtoMessage

func (*IntegerPoints) ProtoMessage()

func (*IntegerPoints) Reset

func (m *IntegerPoints) Reset()

func (*IntegerPoints) Size

func (m *IntegerPoints) Size() (n int)

func (*IntegerPoints) String

func (m *IntegerPoints) String() string

func (*IntegerPoints) Unmarshal

func (m *IntegerPoints) Unmarshal(dAtA []byte) error

type MessageType

type MessageType byte
const (
	HeaderType MessageType = iota + 1
	BucketHeaderType
	BucketFooterType
	SeriesHeaderType
	FloatPointsType
	IntegerPointsType
	UnsignedPointsType
	BooleanPointsType
	StringPointsType
	SeriesFooterType
)

func (MessageType) String

func (i MessageType) String() string

type PointsReader

type PointsReader struct {
	// contains filtered or unexported fields
}

func (*PointsReader) Next

func (pr *PointsReader) Next() (bool, error)

func (*PointsReader) Reset

func (pr *PointsReader) Reset(pointsType MessageType)

func (*PointsReader) Values

func (pr *PointsReader) Values() tsm1.Values

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(reader io.Reader) *Reader

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) NextBucket

func (r *Reader) NextBucket() (*BucketHeader, error)

func (*Reader) NextSeries

func (r *Reader) NextSeries() (*SeriesHeader, error)

func (*Reader) Points

func (r *Reader) Points() *PointsReader

func (*Reader) ReadHeader

func (r *Reader) ReadHeader() (*Header, error)

type SeriesFooter

type SeriesFooter struct {
}

func (*SeriesFooter) Descriptor

func (*SeriesFooter) Descriptor() ([]byte, []int)

func (*SeriesFooter) Marshal

func (m *SeriesFooter) Marshal() (dAtA []byte, err error)

func (*SeriesFooter) MarshalTo

func (m *SeriesFooter) MarshalTo(dAtA []byte) (int, error)

func (*SeriesFooter) ProtoMessage

func (*SeriesFooter) ProtoMessage()

func (*SeriesFooter) Reset

func (m *SeriesFooter) Reset()

func (*SeriesFooter) Size

func (m *SeriesFooter) Size() (n int)

func (*SeriesFooter) String

func (m *SeriesFooter) String() string

func (*SeriesFooter) Unmarshal

func (m *SeriesFooter) Unmarshal(dAtA []byte) error

type SeriesHeader

type SeriesHeader struct {
	FieldType FieldType `protobuf:"varint,1,opt,name=field_type,json=fieldType,proto3,enum=binary.FieldType" json:"field_type,omitempty"`
	SeriesKey []byte    `protobuf:"bytes,2,opt,name=series_key,json=seriesKey,proto3" json:"series_key,omitempty"`
	Field     []byte    `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
}

func (*SeriesHeader) Descriptor

func (*SeriesHeader) Descriptor() ([]byte, []int)

func (*SeriesHeader) Marshal

func (m *SeriesHeader) Marshal() (dAtA []byte, err error)

func (*SeriesHeader) MarshalTo

func (m *SeriesHeader) MarshalTo(dAtA []byte) (int, error)

func (*SeriesHeader) ProtoMessage

func (*SeriesHeader) ProtoMessage()

func (*SeriesHeader) Reset

func (m *SeriesHeader) Reset()

func (*SeriesHeader) Size

func (m *SeriesHeader) Size() (n int)

func (*SeriesHeader) String

func (m *SeriesHeader) String() string

func (*SeriesHeader) Unmarshal

func (m *SeriesHeader) Unmarshal(dAtA []byte) error

type StringPoints

type StringPoints struct {
	Timestamps []int64  `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []string `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"`
}

func (*StringPoints) Descriptor

func (*StringPoints) Descriptor() ([]byte, []int)

func (*StringPoints) Marshal

func (m *StringPoints) Marshal() (dAtA []byte, err error)

func (*StringPoints) MarshalTo

func (m *StringPoints) MarshalTo(dAtA []byte) (int, error)

func (*StringPoints) ProtoMessage

func (*StringPoints) ProtoMessage()

func (*StringPoints) Reset

func (m *StringPoints) Reset()

func (*StringPoints) Size

func (m *StringPoints) Size() (n int)

func (*StringPoints) String

func (m *StringPoints) String() string

func (*StringPoints) Unmarshal

func (m *StringPoints) Unmarshal(dAtA []byte) error

type UnsignedPoints

type UnsignedPoints struct {
	Timestamps []int64  `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []uint64 `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*UnsignedPoints) Descriptor

func (*UnsignedPoints) Descriptor() ([]byte, []int)

func (*UnsignedPoints) Marshal

func (m *UnsignedPoints) Marshal() (dAtA []byte, err error)

func (*UnsignedPoints) MarshalTo

func (m *UnsignedPoints) MarshalTo(dAtA []byte) (int, error)

func (*UnsignedPoints) ProtoMessage

func (*UnsignedPoints) ProtoMessage()

func (*UnsignedPoints) Reset

func (m *UnsignedPoints) Reset()

func (*UnsignedPoints) Size

func (m *UnsignedPoints) Size() (n int)

func (*UnsignedPoints) String

func (m *UnsignedPoints) String() string

func (*UnsignedPoints) Unmarshal

func (m *UnsignedPoints) Unmarshal(dAtA []byte) error

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer, database, rp string, duration time.Duration) *Writer

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) NewBucket

func (w *Writer) NewBucket(start, end int64) (format.BucketWriter, error)

func (*Writer) WriteStats

func (w *Writer) WriteStats(o io.Writer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL