binary

package
v1.11.8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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: "FloatFieldType",
		1: "IntegerFieldType",
		2: "UnsignedFieldType",
		3: "BooleanFieldType",
		4: "StringFieldType",
	}
	FieldType_value = map[string]int32{
		"FloatFieldType":    0,
		"IntegerFieldType":  1,
		"UnsignedFieldType": 2,
		"BooleanFieldType":  3,
		"StringFieldType":   4,
	}
)

Enum value maps for FieldType.

View Source
var (
	Header_Version_name = map[int32]string{
		0: "Version0",
	}
	Header_Version_value = map[string]int32{
		"Version0": 0,
	}
)

Enum value maps for Header_Version.

View Source
var File_tools_binary_proto protoreflect.FileDescriptor
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,proto3" json:"timestamps,omitempty"`
	Values     []bool  `protobuf:"varint,2,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*BooleanPoints) Descriptor deprecated

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

Deprecated: Use BooleanPoints.ProtoReflect.Descriptor instead.

func (*BooleanPoints) GetTimestamps added in v1.9.6

func (x *BooleanPoints) GetTimestamps() []int64

func (*BooleanPoints) GetValues added in v1.9.6

func (x *BooleanPoints) GetValues() []bool

func (*BooleanPoints) ProtoMessage

func (*BooleanPoints) ProtoMessage()

func (*BooleanPoints) ProtoReflect added in v1.9.6

func (x *BooleanPoints) ProtoReflect() protoreflect.Message

func (*BooleanPoints) Reset

func (x *BooleanPoints) Reset()

func (*BooleanPoints) String

func (x *BooleanPoints) String() string

type BucketFooter

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

func (*BucketFooter) Descriptor deprecated

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

Deprecated: Use BucketFooter.ProtoReflect.Descriptor instead.

func (*BucketFooter) ProtoMessage

func (*BucketFooter) ProtoMessage()

func (*BucketFooter) ProtoReflect added in v1.9.6

func (x *BucketFooter) ProtoReflect() protoreflect.Message

func (*BucketFooter) Reset

func (x *BucketFooter) Reset()

func (*BucketFooter) String

func (x *BucketFooter) String() string

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"`
	// contains filtered or unexported fields
}

func (*BucketHeader) Descriptor deprecated

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

Deprecated: Use BucketHeader.ProtoReflect.Descriptor instead.

func (*BucketHeader) GetEnd added in v1.9.6

func (x *BucketHeader) GetEnd() int64

func (*BucketHeader) GetStart added in v1.9.6

func (x *BucketHeader) GetStart() int64

func (*BucketHeader) ProtoMessage

func (*BucketHeader) ProtoMessage()

func (*BucketHeader) ProtoReflect added in v1.9.6

func (x *BucketHeader) ProtoReflect() protoreflect.Message

func (*BucketHeader) Reset

func (x *BucketHeader) Reset()

func (*BucketHeader) String

func (x *BucketHeader) String() string

type FieldType

type FieldType int32
const (
	FieldType_FloatFieldType    FieldType = 0
	FieldType_IntegerFieldType  FieldType = 1
	FieldType_UnsignedFieldType FieldType = 2
	FieldType_BooleanFieldType  FieldType = 3
	FieldType_StringFieldType   FieldType = 4
)

func (FieldType) Descriptor added in v1.9.6

func (FieldType) Descriptor() protoreflect.EnumDescriptor

func (FieldType) Enum added in v1.9.6

func (x FieldType) Enum() *FieldType

func (FieldType) EnumDescriptor deprecated

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

Deprecated: Use FieldType.Descriptor instead.

func (FieldType) Number added in v1.9.6

func (x FieldType) Number() protoreflect.EnumNumber

func (FieldType) String

func (x FieldType) String() string

func (FieldType) Type added in v1.9.6

type FloatPoints

type FloatPoints struct {
	Timestamps []int64   `protobuf:"fixed64,1,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"`
	Values     []float64 `protobuf:"fixed64,2,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*FloatPoints) Descriptor deprecated

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

Deprecated: Use FloatPoints.ProtoReflect.Descriptor instead.

func (*FloatPoints) GetTimestamps added in v1.9.6

func (x *FloatPoints) GetTimestamps() []int64

func (*FloatPoints) GetValues added in v1.9.6

func (x *FloatPoints) GetValues() []float64

func (*FloatPoints) ProtoMessage

func (*FloatPoints) ProtoMessage()

func (*FloatPoints) ProtoReflect added in v1.9.6

func (x *FloatPoints) ProtoReflect() protoreflect.Message

func (*FloatPoints) Reset

func (x *FloatPoints) Reset()

func (*FloatPoints) String

func (x *FloatPoints) String() string
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   int64          `protobuf:"varint,4,opt,name=shard_duration,json=shardDuration,proto3" json:"shard_duration,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetDatabase added in v1.9.6

func (x *Header) GetDatabase() string

func (*Header) GetRetentionPolicy added in v1.9.6

func (x *Header) GetRetentionPolicy() string

func (*Header) GetShardDuration added in v1.9.6

func (x *Header) GetShardDuration() int64

func (*Header) GetVersion added in v1.9.6

func (x *Header) GetVersion() Header_Version

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect added in v1.9.6

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type Header_Version

type Header_Version int32
const (
	Header_Version0 Header_Version = 0
)

func (Header_Version) Descriptor added in v1.9.6

func (Header_Version) Enum added in v1.9.6

func (x Header_Version) Enum() *Header_Version

func (Header_Version) EnumDescriptor deprecated

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

Deprecated: Use Header_Version.Descriptor instead.

func (Header_Version) Number added in v1.9.6

func (Header_Version) String

func (x Header_Version) String() string

func (Header_Version) Type added in v1.9.6

type IntegerPoints

type IntegerPoints struct {
	Timestamps []int64 `protobuf:"fixed64,1,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"`
	Values     []int64 `protobuf:"varint,2,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*IntegerPoints) Descriptor deprecated

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

Deprecated: Use IntegerPoints.ProtoReflect.Descriptor instead.

func (*IntegerPoints) GetTimestamps added in v1.9.6

func (x *IntegerPoints) GetTimestamps() []int64

func (*IntegerPoints) GetValues added in v1.9.6

func (x *IntegerPoints) GetValues() []int64

func (*IntegerPoints) ProtoMessage

func (*IntegerPoints) ProtoMessage()

func (*IntegerPoints) ProtoReflect added in v1.9.6

func (x *IntegerPoints) ProtoReflect() protoreflect.Message

func (*IntegerPoints) Reset

func (x *IntegerPoints) Reset()

func (*IntegerPoints) String

func (x *IntegerPoints) String() string

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 {
	// contains filtered or unexported fields
}

func (*SeriesFooter) Descriptor deprecated

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

Deprecated: Use SeriesFooter.ProtoReflect.Descriptor instead.

func (*SeriesFooter) ProtoMessage

func (*SeriesFooter) ProtoMessage()

func (*SeriesFooter) ProtoReflect added in v1.9.6

func (x *SeriesFooter) ProtoReflect() protoreflect.Message

func (*SeriesFooter) Reset

func (x *SeriesFooter) Reset()

func (*SeriesFooter) String

func (x *SeriesFooter) String() string

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"`
	// contains filtered or unexported fields
}

func (*SeriesHeader) Descriptor deprecated

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

Deprecated: Use SeriesHeader.ProtoReflect.Descriptor instead.

func (*SeriesHeader) GetField added in v1.9.6

func (x *SeriesHeader) GetField() []byte

func (*SeriesHeader) GetFieldType added in v1.9.6

func (x *SeriesHeader) GetFieldType() FieldType

func (*SeriesHeader) GetSeriesKey added in v1.9.6

func (x *SeriesHeader) GetSeriesKey() []byte

func (*SeriesHeader) ProtoMessage

func (*SeriesHeader) ProtoMessage()

func (*SeriesHeader) ProtoReflect added in v1.9.6

func (x *SeriesHeader) ProtoReflect() protoreflect.Message

func (*SeriesHeader) Reset

func (x *SeriesHeader) Reset()

func (*SeriesHeader) String

func (x *SeriesHeader) String() string

type StringPoints

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

func (*StringPoints) Descriptor deprecated

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

Deprecated: Use StringPoints.ProtoReflect.Descriptor instead.

func (*StringPoints) GetTimestamps added in v1.9.6

func (x *StringPoints) GetTimestamps() []int64

func (*StringPoints) GetValues added in v1.9.6

func (x *StringPoints) GetValues() []string

func (*StringPoints) ProtoMessage

func (*StringPoints) ProtoMessage()

func (*StringPoints) ProtoReflect added in v1.9.6

func (x *StringPoints) ProtoReflect() protoreflect.Message

func (*StringPoints) Reset

func (x *StringPoints) Reset()

func (*StringPoints) String

func (x *StringPoints) String() string

type UnsignedPoints

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

func (*UnsignedPoints) Descriptor deprecated

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

Deprecated: Use UnsignedPoints.ProtoReflect.Descriptor instead.

func (*UnsignedPoints) GetTimestamps added in v1.9.6

func (x *UnsignedPoints) GetTimestamps() []int64

func (*UnsignedPoints) GetValues added in v1.9.6

func (x *UnsignedPoints) GetValues() []uint64

func (*UnsignedPoints) ProtoMessage

func (*UnsignedPoints) ProtoMessage()

func (*UnsignedPoints) ProtoReflect added in v1.9.6

func (x *UnsignedPoints) ProtoReflect() protoreflect.Message

func (*UnsignedPoints) Reset

func (x *UnsignedPoints) Reset()

func (*UnsignedPoints) String

func (x *UnsignedPoints) String() string

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