RowBinary

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WriteBufferSize = 524288

Variables

View Source
var WriteBufferPool = sync.Pool{
	New: func() interface{} {
		return &WriteBuffer{}
	},
}

Functions

This section is empty.

Types

type Reader

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

Read all good records from unfinished RowBinary file.

func NewReader

func NewReader(filename string) (*Reader, error)

func (*Reader) Close

func (r *Reader) Close()

func (*Reader) Days

func (r *Reader) Days() uint16

func (*Reader) DaysString

func (r *Reader) DaysString() string

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

func (*Reader) ReadRecord

func (r *Reader) ReadRecord() ([]byte, error)

func (*Reader) Timestamp

func (r *Reader) Timestamp() uint32

func (*Reader) Value

func (r *Reader) Value() float64

func (*Reader) Version

func (r *Reader) Version() uint32

type WriteBuffer

type WriteBuffer struct {
	Used int
	Body [WriteBufferSize]byte
}

func GetWriteBuffer

func GetWriteBuffer() *WriteBuffer

func (*WriteBuffer) Bytes

func (wb *WriteBuffer) Bytes() []byte

func (*WriteBuffer) CanWriteGraphitePoint

func (wb *WriteBuffer) CanWriteGraphitePoint(metricLen int) bool

func (*WriteBuffer) Empty

func (wb *WriteBuffer) Empty() bool

func (*WriteBuffer) Release

func (wb *WriteBuffer) Release()

func (*WriteBuffer) Reset

func (wb *WriteBuffer) Reset() *WriteBuffer

func (*WriteBuffer) Write

func (wb *WriteBuffer) Write(p []byte)

func (*WriteBuffer) WriteBytes

func (wb *WriteBuffer) WriteBytes(p []byte)

func (*WriteBuffer) WriteFloat64

func (wb *WriteBuffer) WriteFloat64(value float64)

func (*WriteBuffer) WriteGraphitePoint

func (wb *WriteBuffer) WriteGraphitePoint(name []byte, value float64, timestamp uint32, days uint16, version uint32)

func (*WriteBuffer) WriteUint16

func (wb *WriteBuffer) WriteUint16(value uint16)

func (*WriteBuffer) WriteUint32

func (wb *WriteBuffer) WriteUint32(value uint32)

func (*WriteBuffer) WriteUint64

func (wb *WriteBuffer) WriteUint64(value uint64)

Jump to

Keyboard shortcuts

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