Documentation ¶
Index ¶
- Constants
- Variables
- func PrecalcTimestampToDays(timestamp uint32) uint16
- func ReverseBytes(target []byte) []byte
- func ReverseBytesTo(dst []byte, src []byte)
- func SetDefaultDate()
- func SetUTCDate()
- func SlowTimestampToDays(timestamp uint32) uint16
- func TimeToDaysFormat(t time.Time) string
- func TimestampToDaysFormat(timestamp int64) string
- func UTCTimestampToDays(timestamp uint32) uint16
- func UTCTimestampToDaysFormat(timestamp uint32) string
- func WriteBytes(w io.Writer, p []byte) error
- func WriteUint16(w io.Writer, value uint16) error
- func WriteUint32(w io.Writer, value uint32) error
- type Reader
- func (r *Reader) Close()
- func (r *Reader) Days() uint16
- func (r *Reader) DaysString() string
- func (r *Reader) Read(p []byte) (int, error)
- func (r *Reader) ReadRecord() ([]byte, error)
- func (r *Reader) SetZeroVersion(v bool)
- func (r *Reader) Timestamp() uint32
- func (r *Reader) Value() float64
- func (r *Reader) Version() uint32
- type WriteBuffer
- func (wb *WriteBuffer) Bytes() []byte
- func (wb *WriteBuffer) CanWriteGraphitePoint(metricLen int) bool
- func (wb *WriteBuffer) Confirm()
- func (wb *WriteBuffer) ConfirmRequired() bool
- func (wb *WriteBuffer) Empty() bool
- func (wb *WriteBuffer) Fail(err error)
- func (wb *WriteBuffer) FreeSize() int
- func (wb *WriteBuffer) Len() int
- func (wb *WriteBuffer) Release()
- func (wb *WriteBuffer) Reset() *WriteBuffer
- func (wb *WriteBuffer) Write(p []byte)
- func (wb *WriteBuffer) WriteBytes(p []byte)
- func (wb *WriteBuffer) WriteFloat64(value float64)
- func (wb *WriteBuffer) WriteGraphitePoint(name []byte, value float64, timestamp uint32, version uint32)
- func (wb *WriteBuffer) WriteGraphitePointTagged(labels []string, value float64, timestamp uint32, version uint32)
- func (wb *WriteBuffer) WriteReversePath(p []byte)
- func (wb *WriteBuffer) WriteString(s string)
- func (wb *WriteBuffer) WriteTagged(tagged []string)
- func (wb *WriteBuffer) WriteUVarint(v uint64)
- func (wb *WriteBuffer) WriteUint16(value uint16)
- func (wb *WriteBuffer) WriteUint32(value uint32)
- func (wb *WriteBuffer) WriteUint64(value uint64)
- type Writer
Constants ¶
View Source
const ( SIZE_INT64 = 8 SIZE_INT16 = 2 SIZE_INT32 = 4 )
View Source
const WriteBufferSize = 524288
Variables ¶
View Source
var TimestampToDays func(timestamp uint32) uint16
Functions ¶
func PrecalcTimestampToDays ¶ added in v0.11.4
PrecalcTimestampToDays is broken, not always UTC, like SlowTimestampToDays
func ReverseBytes ¶ added in v0.6.1
func ReverseBytesTo ¶ added in v0.11.2
func SetDefaultDate ¶ added in v0.11.4
func SetDefaultDate()
PrecalcTimestampToDays is broken, not always UTC, like SlowTimestampToDays, but used from start of project
func SetUTCDate ¶ added in v0.11.4
func SetUTCDate()
UTCTimestampToDays is always UTC, but mismatch SlowTimestampToDays and need points/index/tags table rebuild (with Date recalc)
func SlowTimestampToDays ¶ added in v0.8.1
SlowTimestampToDays is broken, not always UTC
func TimeToDaysFormat ¶ added in v0.11.4
TimeToDaysFormat like TimestampDaysFormat, but for time.Time
func TimestampToDaysFormat ¶ added in v0.11.4
TimestampToDaysFormat is pair for SlowTimestampToDays and broken also for symmetric
func UTCTimestampToDays ¶ added in v0.11.4
func UTCTimestampToDaysFormat ¶ added in v0.11.4
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Read all good records from unfinished RowBinary file.
func (*Reader) DaysString ¶
func (*Reader) ReadRecord ¶
func (*Reader) SetZeroVersion ¶ added in v0.9.0
type WriteBuffer ¶
type WriteBuffer struct { Used int Body [WriteBufferSize]byte // contains filtered or unexported fields }
func GetWriteBuffer ¶
func GetWriteBuffer() *WriteBuffer
func GetWriterBufferWithConfirm ¶ added in v0.6.1
func GetWriterBufferWithConfirm(wg *sync.WaitGroup, errorChan chan error) *WriteBuffer
func (*WriteBuffer) Bytes ¶
func (wb *WriteBuffer) Bytes() []byte
func (*WriteBuffer) CanWriteGraphitePoint ¶
func (wb *WriteBuffer) CanWriteGraphitePoint(metricLen int) bool
func (*WriteBuffer) Confirm ¶ added in v0.6.1
func (wb *WriteBuffer) Confirm()
func (*WriteBuffer) ConfirmRequired ¶ added in v0.6.1
func (wb *WriteBuffer) ConfirmRequired() bool
func (*WriteBuffer) Empty ¶
func (wb *WriteBuffer) Empty() bool
func (*WriteBuffer) Fail ¶ added in v0.6.1
func (wb *WriteBuffer) Fail(err error)
func (*WriteBuffer) FreeSize ¶ added in v0.11.2
func (wb *WriteBuffer) FreeSize() int
func (*WriteBuffer) Len ¶ added in v0.11.2
func (wb *WriteBuffer) Len() int
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, version uint32)
func (*WriteBuffer) WriteGraphitePointTagged ¶ added in v0.10.1
func (wb *WriteBuffer) WriteGraphitePointTagged(labels []string, value float64, timestamp uint32, version uint32)
func (*WriteBuffer) WriteReversePath ¶ added in v0.6.1
func (wb *WriteBuffer) WriteReversePath(p []byte)
func (*WriteBuffer) WriteString ¶ added in v0.8.0
func (wb *WriteBuffer) WriteString(s string)
func (*WriteBuffer) WriteTagged ¶ added in v0.10.1
func (wb *WriteBuffer) WriteTagged(tagged []string)
func (*WriteBuffer) WriteUVarint ¶ added in v0.8.0
func (wb *WriteBuffer) WriteUVarint(v uint64)
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)
type Writer ¶ added in v0.9.0
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶ added in v0.9.0
func NewWriter(ctx context.Context, writeChan chan *WriteBuffer) *Writer
func (*Writer) PointsWritten ¶ added in v0.9.0
func (*Writer) WriteErrors ¶ added in v0.9.0
func (*Writer) WritePoint ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.