model

package
v0.0.0-...-db14c7d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Compression_None = Compression(0)

	Compression_LZ4 = Compression(1)
)
View Source
const (
	StreamKind_Log = StreamKind(0)

	StreamKind_TimeSeries = StreamKind(1)

	StreamKind_Table = StreamKind(2)
)
View Source
const (
	MessageType_Record = MessageType(1)

	MessageType_Block = MessageType(2)

	MessageType_EOS = MessageType(3)

	MessageType_EOB = MessageType(4)

	MessageType_Savepoint = MessageType(5)

	MessageType_Starting = MessageType(6)

	MessageType_Progress = MessageType(7)

	MessageType_Started = MessageType(8)

	MessageType_Stopped = MessageType(9)
)
View Source
const (
	// Stream is composed from another stream or external datasource and it stopped
	StopReason_Source = StopReason(1)

	// Stream has been paused
	StopReason_Paused = StopReason(2)

	// Stream is being migrated to a new writer
	StopReason_Migrate = StopReason(3)

	// Stream has stopped unexpectedly
	StopReason_Error = StopReason(4)
)
View Source
const (
	SchemaKind_Bytes = SchemaKind(0)

	SchemaKind_MoonBuf = SchemaKind(1)

	SchemaKind_ProtoBuf = SchemaKind(2)

	SchemaKind_FlatBuffers = SchemaKind(3)

	SchemaKind_Json = SchemaKind(4)

	SchemaKind_MessagePack = SchemaKind(5)
)
View Source
const (
	BlockRecordHeaderSize = 36 // ID (8 bytes) | Timestamp (8 bytes) | Start (8 bytes) | End (8 bytes) | Size (2 bytes) ... 2 (bytes)
)
View Source
const (
	MinCompressSize = 128
)

Variables

View Source
var (
	Block1MaxDataSize  = (1024 - SizeofBlockHeader) - (lz4.CompressBlockBound(1024-SizeofBlockHeader) + 1)
	Block2MaxDataSize  = (2048 - SizeofBlockHeader) - (lz4.CompressBlockBound(2048-SizeofBlockHeader) + 1)
	Block4MaxDataSize  = (4096 - SizeofBlockHeader) - (lz4.CompressBlockBound(4096-SizeofBlockHeader) + 1)
	Block8MaxDataSize  = (8192 - SizeofBlockHeader) - (lz4.CompressBlockBound(8192-SizeofBlockHeader) + 1)
	Block16MaxDataSize = (16384 - SizeofBlockHeader) - (lz4.CompressBlockBound(16384-SizeofBlockHeader) + 1)
	Block32MaxDataSize = (32768 - SizeofBlockHeader) - (lz4.CompressBlockBound(32768-SizeofBlockHeader) + 1)
	Block64MaxDataSize = (65536 - SizeofBlockHeader) - (lz4.CompressBlockBound(65536-SizeofBlockHeader) + 1)
)
View Source
var (
	SizeofBlockHeader  = int(unsafe.Sizeof(BlockHeader{}))
	SizeofRecordHeader = int(unsafe.Sizeof(RecordHeader{}))
)
View Source
var (
	MaxDataSize             = math.MaxUint16 - int(unsafe.Sizeof(BlockHeader{}))
	MaxDataSizeUncompressed = MaxDataSize - lz4.CompressBlockBound(MaxDataSize) - 1
)
View Source
var (
	ErrUnknownCompression = errors.New("unknown compression algorithm")
	ErrOverflow           = errors.New("overflow")
	ErrVarintOverflow     = errors.New("varint overflow")
	ErrFieldTagTooBig     = errors.New("field tag too big")
	ErrIDTooSmall         = errors.New("id is equal or smaller than top item")
	ErrTimeIsPast         = errors.New("time is less than top item")
	ErrRecordTooBig       = errors.New("record too big")
	ErrRecordNotFixed     = errors.New("expected a fixed record size")
	ErrCorrupted          = errors.New("corrupted")
	ErrNil                = errors.New("nil")
	ErrNotExist           = errors.New("corrupted")
	ErrSizeDataMismatch   = errors.New("size != len(data)")
	ErrBlockAllocatorOOM  = errors.New("blockAllocator.Alloc() returned nil")
	ErrOutOfMemory        = errors.New("out of memory")
	ErrOutOfSync          = errors.New("out of sync")
	ErrOutOfOrder         = errors.New("out of order")
	ErrRecordOrBlocks     = errors.New("oneof record or blocks")
	ErrGap                = errors.New("gap")
	ErrWrongStream        = errors.New("wrong stream")
	ErrWrongBlock         = errors.New("wrong block")
	ErrBlockCompleted     = errors.New("block completed")
	ErrConcurrentWriters  = errors.New("concurrent writers")
	ErrUnknownMessage     = errors.New("unknown message")
	ErrNotEnd             = errors.New("not end")
)

Functions

func Compress

func Compress(b []byte) ([]byte, error)

Compress compresses the supplied buffer using LZ4

func MarshalMessageCompactTo

func MarshalMessageCompactTo(message Message, w *Writer) error

func PutBlock16Mut

func PutBlock16Mut(b *Block16Mut)

func PutBlock1Mut

func PutBlock1Mut(b *Block1Mut)

func PutBlock2Mut

func PutBlock2Mut(b *Block2Mut)

func PutBlock32Mut

func PutBlock32Mut(b *Block32Mut)

func PutBlock4Mut

func PutBlock4Mut(b *Block4Mut)

func PutBlock64Mut

func PutBlock64Mut(b *Block64Mut)

func PutBlock8Mut

func PutBlock8Mut(b *Block8Mut)

func PutBlockMessage

func PutBlockMessage(block *BlockMessage)

func PutBlockMut

func PutBlockMut(b BlockMut)

func PutEOB

func PutEOB(msg *EOB)

func PutEOS

func PutEOS(msg *EOS)

func PutProgress

func PutProgress(msg *Progress)

func PutRecord

func PutRecord(record *RecordMessage)

func PutSavepoint

func PutSavepoint(msg *Savepoint)

func PutStarted

func PutStarted(msg *Started)

func PutStarting

func PutStarting(msg *Starting)

func PutStopped

func PutStopped(msg *Stopped)

Types

type AccountStats

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

func (*AccountStats) Appender

func (s *AccountStats) Appender() *Stats

func (*AccountStats) Bytes

func (s *AccountStats) Bytes() []byte

func (*AccountStats) Clone

func (s *AccountStats) Clone() *AccountStats

func (*AccountStats) Id

func (s *AccountStats) Id() int64

func (*AccountStats) MarshalBinary

func (s *AccountStats) MarshalBinary() ([]byte, error)

func (*AccountStats) MarshalBinaryTo

func (s *AccountStats) MarshalBinaryTo(b []byte) []byte

func (*AccountStats) MarshalMap

func (s *AccountStats) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*AccountStats) Mut

func (s *AccountStats) Mut() *AccountStatsMut

func (*AccountStats) Read

func (s *AccountStats) Read(b []byte) (n int, err error)

func (*AccountStats) ReadFrom

func (s *AccountStats) ReadFrom(r io.Reader) (int64, error)

func (*AccountStats) Storage

func (s *AccountStats) Storage() *Stats

func (*AccountStats) Streams

func (s *AccountStats) Streams() int64

func (*AccountStats) String

func (s *AccountStats) String() string

func (*AccountStats) UnmarshalBinary

func (s *AccountStats) UnmarshalBinary(b []byte) error

func (*AccountStats) WriteTo

func (s *AccountStats) WriteTo(w io.Writer) (int64, error)

type AccountStatsMut

type AccountStatsMut struct {
	AccountStats
}

func (*AccountStatsMut) Appender

func (s *AccountStatsMut) Appender() *StatsMut

func (*AccountStatsMut) Clone

func (s *AccountStatsMut) Clone() *AccountStatsMut

func (*AccountStatsMut) Freeze

func (s *AccountStatsMut) Freeze() *AccountStats

func (*AccountStatsMut) SetAppender

func (s *AccountStatsMut) SetAppender(v *Stats) *AccountStatsMut

func (*AccountStatsMut) SetId

func (s *AccountStatsMut) SetId(v int64) *AccountStatsMut

func (*AccountStatsMut) SetStorage

func (s *AccountStatsMut) SetStorage(v *Stats) *AccountStatsMut

func (*AccountStatsMut) SetStreams

func (s *AccountStatsMut) SetStreams(v int64) *AccountStatsMut

func (*AccountStatsMut) Storage

func (s *AccountStatsMut) Storage() *StatsMut

type Block

type Block interface {
	Message

	Header() *BlockHeader

	Data() []byte
}

type Block1

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

Block1

func (*Block1) Body

func (s *Block1) Body() *Bytes944

func (*Block1) Bytes

func (s *Block1) Bytes() []byte

func (*Block1) Clone

func (s *Block1) Clone() *Block1

func (*Block1) Data

func (bm *Block1) Data() []byte

func (*Block1) Head

func (s *Block1) Head() *BlockHeader

func (*Block1) Header

func (b1 *Block1) Header() *BlockHeader

func (*Block1) MarshalBinary

func (s *Block1) MarshalBinary() ([]byte, error)

func (*Block1) MarshalBinaryTo

func (s *Block1) MarshalBinaryTo(b []byte) []byte

func (*Block1) MarshalCompactTo

func (b *Block1) MarshalCompactTo(w *Writer) error

func (*Block1) MarshalMap

func (s *Block1) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block1) MessageID

func (b *Block1) MessageID() int64

func (*Block1) Mut

func (s *Block1) Mut() *Block1Mut

func (*Block1) Read

func (s *Block1) Read(b []byte) (n int, err error)

func (*Block1) ReadFrom

func (s *Block1) ReadFrom(r io.Reader) (int64, error)

func (*Block1) String

func (s *Block1) String() string

func (*Block1) Timestamp

func (b *Block1) Timestamp() int64

func (*Block1) Type

func (b1 *Block1) Type() MessageType

func (*Block1) UnmarshalBinary

func (s *Block1) UnmarshalBinary(b []byte) error

func (*Block1) UnmarshalCompactFrom

func (b *Block1) UnmarshalCompactFrom(rd *Reader) error

func (*Block1) WriteTo

func (s *Block1) WriteTo(w io.Writer) (int64, error)

type Block16

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

Block16

func (*Block16) Body

func (s *Block16) Body() *Bytes16306

func (*Block16) Bytes

func (s *Block16) Bytes() []byte

func (*Block16) Clone

func (s *Block16) Clone() *Block16

func (*Block16) Data

func (bm *Block16) Data() []byte

func (*Block16) Head

func (s *Block16) Head() *BlockHeader

func (*Block16) Header

func (b *Block16) Header() *BlockHeader

func (*Block16) MarshalBinary

func (s *Block16) MarshalBinary() ([]byte, error)

func (*Block16) MarshalBinaryTo

func (s *Block16) MarshalBinaryTo(b []byte) []byte

func (*Block16) MarshalCompactTo

func (b *Block16) MarshalCompactTo(w *Writer) error

func (*Block16) MarshalMap

func (s *Block16) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block16) MessageID

func (b *Block16) MessageID() int64

func (*Block16) Mut

func (s *Block16) Mut() *Block16Mut

func (*Block16) Read

func (s *Block16) Read(b []byte) (n int, err error)

func (*Block16) ReadFrom

func (s *Block16) ReadFrom(r io.Reader) (int64, error)

func (*Block16) String

func (s *Block16) String() string

func (*Block16) Timestamp

func (b *Block16) Timestamp() int64

func (*Block16) Type

func (*Block16) Type() MessageType

func (*Block16) UnmarshalBinary

func (s *Block16) UnmarshalBinary(b []byte) error

func (*Block16) UnmarshalCompactFrom

func (b *Block16) UnmarshalCompactFrom(rd *Reader) error

func (*Block16) WriteTo

func (s *Block16) WriteTo(w io.Writer) (int64, error)

type Block16Mut

type Block16Mut struct {
	Block16
}

Block16

func GetBlock16Mut

func GetBlock16Mut() *Block16Mut

func (*Block16Mut) AppendRecord

func (b *Block16Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block16Mut) Clone

func (s *Block16Mut) Clone() *Block16Mut

func (*Block16Mut) Freeze

func (s *Block16Mut) Freeze() *Block16

func (*Block16Mut) Head

func (s *Block16Mut) Head() *BlockHeaderMut

func (*Block16Mut) HeaderMut

func (b *Block16Mut) HeaderMut() *BlockHeaderMut

func (*Block16Mut) SetBody

func (s *Block16Mut) SetBody(v Bytes16306) *Block16Mut

func (*Block16Mut) SetHead

func (s *Block16Mut) SetHead(v *BlockHeader) *Block16Mut

func (*Block16Mut) ToMessage

func (bm *Block16Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block16Mut) Uncompress

func (bm *Block16Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block1Mut

type Block1Mut struct {
	Block1
}

Block1

func GetBlock1Mut

func GetBlock1Mut() *Block1Mut

func (*Block1Mut) AppendRecord

func (b *Block1Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block1Mut) Clone

func (s *Block1Mut) Clone() *Block1Mut

func (*Block1Mut) Freeze

func (s *Block1Mut) Freeze() *Block1

func (*Block1Mut) Head

func (s *Block1Mut) Head() *BlockHeaderMut

func (*Block1Mut) HeaderMut

func (b1 *Block1Mut) HeaderMut() *BlockHeaderMut

func (*Block1Mut) SetBody

func (s *Block1Mut) SetBody(v Bytes944) *Block1Mut

func (*Block1Mut) SetHead

func (s *Block1Mut) SetHead(v *BlockHeader) *Block1Mut

func (*Block1Mut) ToMessage

func (bm *Block1Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block1Mut) Uncompress

func (bm *Block1Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block2

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

Block2

func (*Block2) Body

func (s *Block2) Body() *Bytes1968

func (*Block2) Bytes

func (s *Block2) Bytes() []byte

func (*Block2) Clone

func (s *Block2) Clone() *Block2

func (*Block2) Data

func (b *Block2) Data() []byte

func (*Block2) Head

func (s *Block2) Head() *BlockHeader

func (*Block2) Header

func (b *Block2) Header() *BlockHeader

func (*Block2) MarshalBinary

func (s *Block2) MarshalBinary() ([]byte, error)

func (*Block2) MarshalBinaryTo

func (s *Block2) MarshalBinaryTo(b []byte) []byte

func (*Block2) MarshalCompactTo

func (b *Block2) MarshalCompactTo(w *Writer) error

func (*Block2) MarshalMap

func (s *Block2) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block2) MessageID

func (b *Block2) MessageID() int64

func (*Block2) Mut

func (s *Block2) Mut() *Block2Mut

func (*Block2) Read

func (s *Block2) Read(b []byte) (n int, err error)

func (*Block2) ReadFrom

func (s *Block2) ReadFrom(r io.Reader) (int64, error)

func (*Block2) String

func (s *Block2) String() string

func (*Block2) Timestamp

func (b *Block2) Timestamp() int64

func (*Block2) Type

func (*Block2) Type() MessageType

func (*Block2) UnmarshalBinary

func (s *Block2) UnmarshalBinary(b []byte) error

func (*Block2) UnmarshalCompactFrom

func (b *Block2) UnmarshalCompactFrom(rd *Reader) error

func (*Block2) WriteTo

func (s *Block2) WriteTo(w io.Writer) (int64, error)

type Block2Mut

type Block2Mut struct {
	Block2
}

Block2

func GetBlock2Mut

func GetBlock2Mut() *Block2Mut

func (*Block2Mut) AppendRecord

func (b *Block2Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block2Mut) Clone

func (s *Block2Mut) Clone() *Block2Mut

func (*Block2Mut) Freeze

func (s *Block2Mut) Freeze() *Block2

func (*Block2Mut) Head

func (s *Block2Mut) Head() *BlockHeaderMut

func (*Block2Mut) HeaderMut

func (b *Block2Mut) HeaderMut() *BlockHeaderMut

func (*Block2Mut) SetBody

func (s *Block2Mut) SetBody(v Bytes1968) *Block2Mut

func (*Block2Mut) SetHead

func (s *Block2Mut) SetHead(v *BlockHeader) *Block2Mut

func (*Block2Mut) ToMessage

func (bm *Block2Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block2Mut) Uncompress

func (bm *Block2Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block32

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

Block32

func (*Block32) Body

func (s *Block32) Body() *Bytes32688

func (*Block32) Bytes

func (s *Block32) Bytes() []byte

func (*Block32) Clone

func (s *Block32) Clone() *Block32

func (*Block32) Data

func (bm *Block32) Data() []byte

func (*Block32) Head

func (s *Block32) Head() *BlockHeader

func (*Block32) Header

func (b *Block32) Header() *BlockHeader

func (*Block32) MarshalBinary

func (s *Block32) MarshalBinary() ([]byte, error)

func (*Block32) MarshalBinaryTo

func (s *Block32) MarshalBinaryTo(b []byte) []byte

func (*Block32) MarshalCompactTo

func (b *Block32) MarshalCompactTo(w *Writer) error

func (*Block32) MarshalMap

func (s *Block32) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block32) MessageID

func (b *Block32) MessageID() int64

func (*Block32) Mut

func (s *Block32) Mut() *Block32Mut

func (*Block32) Read

func (s *Block32) Read(b []byte) (n int, err error)

func (*Block32) ReadFrom

func (s *Block32) ReadFrom(r io.Reader) (int64, error)

func (*Block32) String

func (s *Block32) String() string

func (*Block32) Timestamp

func (b *Block32) Timestamp() int64

func (*Block32) Type

func (*Block32) Type() MessageType

func (*Block32) UnmarshalBinary

func (s *Block32) UnmarshalBinary(b []byte) error

func (*Block32) UnmarshalCompactFrom

func (b *Block32) UnmarshalCompactFrom(rd *Reader) error

func (*Block32) WriteTo

func (s *Block32) WriteTo(w io.Writer) (int64, error)

type Block32Mut

type Block32Mut struct {
	Block32
}

Block32

func GetBlock32Mut

func GetBlock32Mut() *Block32Mut

func (*Block32Mut) AppendRecord

func (b *Block32Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block32Mut) Clone

func (s *Block32Mut) Clone() *Block32Mut

func (*Block32Mut) Freeze

func (s *Block32Mut) Freeze() *Block32

func (*Block32Mut) Head

func (s *Block32Mut) Head() *BlockHeaderMut

func (*Block32Mut) HeaderMut

func (b *Block32Mut) HeaderMut() *BlockHeaderMut

func (*Block32Mut) SetBody

func (s *Block32Mut) SetBody(v Bytes32688) *Block32Mut

func (*Block32Mut) SetHead

func (s *Block32Mut) SetHead(v *BlockHeader) *Block32Mut

func (*Block32Mut) ToMessage

func (bm *Block32Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block32Mut) Uncompress

func (bm *Block32Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block4

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

Block4

func (*Block4) Body

func (s *Block4) Body() *Bytes4016

func (*Block4) Bytes

func (s *Block4) Bytes() []byte

func (*Block4) Clone

func (s *Block4) Clone() *Block4

func (*Block4) Data

func (bm *Block4) Data() []byte

func (*Block4) Head

func (s *Block4) Head() *BlockHeader

func (*Block4) Header

func (b *Block4) Header() *BlockHeader

func (*Block4) MarshalBinary

func (s *Block4) MarshalBinary() ([]byte, error)

func (*Block4) MarshalBinaryTo

func (s *Block4) MarshalBinaryTo(b []byte) []byte

func (*Block4) MarshalCompactTo

func (b *Block4) MarshalCompactTo(w *Writer) error

func (*Block4) MarshalMap

func (s *Block4) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block4) MessageID

func (b *Block4) MessageID() int64

func (*Block4) Mut

func (s *Block4) Mut() *Block4Mut

func (*Block4) Read

func (s *Block4) Read(b []byte) (n int, err error)

func (*Block4) ReadFrom

func (s *Block4) ReadFrom(r io.Reader) (int64, error)

func (*Block4) String

func (s *Block4) String() string

func (*Block4) Timestamp

func (b *Block4) Timestamp() int64

func (*Block4) Type

func (*Block4) Type() MessageType

func (*Block4) UnmarshalBinary

func (s *Block4) UnmarshalBinary(b []byte) error

func (*Block4) UnmarshalCompactFrom

func (b *Block4) UnmarshalCompactFrom(rd *Reader) error

func (*Block4) WriteTo

func (s *Block4) WriteTo(w io.Writer) (int64, error)

type Block4Mut

type Block4Mut struct {
	Block4
}

Block4

func GetBlock4Mut

func GetBlock4Mut() *Block4Mut

func (*Block4Mut) AppendRecord

func (b *Block4Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block4Mut) Clone

func (s *Block4Mut) Clone() *Block4Mut

func (*Block4Mut) Freeze

func (s *Block4Mut) Freeze() *Block4

func (*Block4Mut) Head

func (s *Block4Mut) Head() *BlockHeaderMut

func (*Block4Mut) HeaderMut

func (b *Block4Mut) HeaderMut() *BlockHeaderMut

func (*Block4Mut) SetBody

func (s *Block4Mut) SetBody(v Bytes4016) *Block4Mut

func (*Block4Mut) SetHead

func (s *Block4Mut) SetHead(v *BlockHeader) *Block4Mut

func (*Block4Mut) ToMessage

func (bm *Block4Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block4Mut) Uncompress

func (bm *Block4Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block64

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

Block64

func (*Block64) Body

func (s *Block64) Body() *Bytes65456

func (*Block64) Bytes

func (s *Block64) Bytes() []byte

func (*Block64) Clone

func (s *Block64) Clone() *Block64

func (*Block64) Data

func (bm *Block64) Data() []byte

func (*Block64) Head

func (s *Block64) Head() *BlockHeader

func (*Block64) Header

func (b *Block64) Header() *BlockHeader

func (*Block64) MarshalBinary

func (s *Block64) MarshalBinary() ([]byte, error)

func (*Block64) MarshalBinaryTo

func (s *Block64) MarshalBinaryTo(b []byte) []byte

func (*Block64) MarshalCompactTo

func (b *Block64) MarshalCompactTo(w *Writer) error

func (*Block64) MarshalMap

func (s *Block64) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block64) MessageID

func (b *Block64) MessageID() int64

func (*Block64) Mut

func (s *Block64) Mut() *Block64Mut

func (*Block64) Read

func (s *Block64) Read(b []byte) (n int, err error)

func (*Block64) ReadFrom

func (s *Block64) ReadFrom(r io.Reader) (int64, error)

func (*Block64) String

func (s *Block64) String() string

func (*Block64) Timestamp

func (b *Block64) Timestamp() int64

func (*Block64) Type

func (*Block64) Type() MessageType

func (*Block64) UnmarshalBinary

func (s *Block64) UnmarshalBinary(b []byte) error

func (*Block64) UnmarshalCompactFrom

func (b *Block64) UnmarshalCompactFrom(rd *Reader) error

func (*Block64) WriteTo

func (s *Block64) WriteTo(w io.Writer) (int64, error)

type Block64Mut

type Block64Mut struct {
	Block64
}

Block64

func GetBlock64Mut

func GetBlock64Mut() *Block64Mut

func (*Block64Mut) AppendRecord

func (b *Block64Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block64Mut) Clone

func (s *Block64Mut) Clone() *Block64Mut

func (*Block64Mut) Freeze

func (s *Block64Mut) Freeze() *Block64

func (*Block64Mut) Head

func (s *Block64Mut) Head() *BlockHeaderMut

func (*Block64Mut) HeaderMut

func (b *Block64Mut) HeaderMut() *BlockHeaderMut

func (*Block64Mut) SetBody

func (s *Block64Mut) SetBody(v Bytes65456) *Block64Mut

func (*Block64Mut) SetHead

func (s *Block64Mut) SetHead(v *BlockHeader) *Block64Mut

func (*Block64Mut) ToMessage

func (bm *Block64Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block64Mut) Uncompress

func (bm *Block64Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type Block8

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

Block8

func (*Block8) Body

func (s *Block8) Body() *Bytes8112

func (*Block8) Bytes

func (s *Block8) Bytes() []byte

func (*Block8) Clone

func (s *Block8) Clone() *Block8

func (*Block8) Data

func (bm *Block8) Data() []byte

func (*Block8) Head

func (s *Block8) Head() *BlockHeader

func (*Block8) Header

func (b *Block8) Header() *BlockHeader

func (*Block8) MarshalBinary

func (s *Block8) MarshalBinary() ([]byte, error)

func (*Block8) MarshalBinaryTo

func (s *Block8) MarshalBinaryTo(b []byte) []byte

func (*Block8) MarshalCompactTo

func (b *Block8) MarshalCompactTo(w *Writer) error

func (*Block8) MarshalMap

func (s *Block8) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Block8) MessageID

func (b *Block8) MessageID() int64

func (*Block8) Mut

func (s *Block8) Mut() *Block8Mut

func (*Block8) Read

func (s *Block8) Read(b []byte) (n int, err error)

func (*Block8) ReadFrom

func (s *Block8) ReadFrom(r io.Reader) (int64, error)

func (*Block8) String

func (s *Block8) String() string

func (*Block8) Timestamp

func (b *Block8) Timestamp() int64

func (*Block8) Type

func (*Block8) Type() MessageType

func (*Block8) UnmarshalBinary

func (s *Block8) UnmarshalBinary(b []byte) error

func (*Block8) UnmarshalCompactFrom

func (b *Block8) UnmarshalCompactFrom(rd *Reader) error

func (*Block8) WriteTo

func (s *Block8) WriteTo(w io.Writer) (int64, error)

type Block8Mut

type Block8Mut struct {
	Block8
}

Block8

func GetBlock8Mut

func GetBlock8Mut() *Block8Mut

func (*Block8Mut) AppendRecord

func (b *Block8Mut) AppendRecord(id, created, time, end int64, data []byte) error

func (*Block8Mut) Clone

func (s *Block8Mut) Clone() *Block8Mut

func (*Block8Mut) Freeze

func (s *Block8Mut) Freeze() *Block8

func (*Block8Mut) Head

func (s *Block8Mut) Head() *BlockHeaderMut

func (*Block8Mut) HeaderMut

func (b *Block8Mut) HeaderMut() *BlockHeaderMut

func (*Block8Mut) SetBody

func (s *Block8Mut) SetBody(v Bytes8112) *Block8Mut

func (*Block8Mut) SetHead

func (s *Block8Mut) SetHead(v *BlockHeader) *Block8Mut

func (*Block8Mut) ToMessage

func (bm *Block8Mut) ToMessage(compress bool) (*BlockMessage, error)

func (*Block8Mut) Uncompress

func (bm *Block8Mut) Uncompress(b []byte) error

Uncompress decompresses the LZ4 encoded input into the memory of BlockMut

type BlockAllocator

type BlockAllocator interface {
	Alloc() BlockMut

	Release(b BlockMut)
}

BlockAllocator allocates a new Block

var (
	PooledBlock1Allocator  BlockAllocator = block1Allocator{}
	PooledBlock2Allocator  BlockAllocator = block2Allocator{}
	PooledBlock4Allocator  BlockAllocator = block4Allocator{}
	PooledBlock8Allocator  BlockAllocator = block8Allocator{}
	PooledBlock16Allocator BlockAllocator = block16Allocator{}
	PooledBlock32Allocator BlockAllocator = block32Allocator{}
	PooledBlock64Allocator BlockAllocator = block64Allocator{}
)

func GetBlockAllocator

func GetBlockAllocator(size int) BlockAllocator

type BlockHeader

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

BlockHeader

func (*BlockHeader) Bytes

func (s *BlockHeader) Bytes() []byte

func (*BlockHeader) Clone

func (s *BlockHeader) Clone() *BlockHeader

func (*BlockHeader) Completed

func (s *BlockHeader) Completed() int64

func (*BlockHeader) Compression

func (s *BlockHeader) Compression() Compression

func (*BlockHeader) Count

func (s *BlockHeader) Count() uint16

func (*BlockHeader) Created

func (s *BlockHeader) Created() int64

func (*BlockHeader) End

func (s *BlockHeader) End() int64

func (*BlockHeader) Id

func (s *BlockHeader) Id() int64

func (*BlockHeader) IsComplete

func (b *BlockHeader) IsComplete() bool

func (*BlockHeader) IsPartial

func (b *BlockHeader) IsPartial() bool

func (*BlockHeader) MarshalBinary

func (s *BlockHeader) MarshalBinary() ([]byte, error)

func (*BlockHeader) MarshalBinaryTo

func (s *BlockHeader) MarshalBinaryTo(b []byte) []byte

func (*BlockHeader) MarshalCompactTo

func (h *BlockHeader) MarshalCompactTo(w *Writer) error

func (*BlockHeader) MarshalMap

func (s *BlockHeader) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*BlockHeader) Max

func (s *BlockHeader) Max() int64

func (*BlockHeader) Min

func (s *BlockHeader) Min() int64

func (*BlockHeader) Mut

func (s *BlockHeader) Mut() *BlockHeaderMut

func (*BlockHeader) Read

func (s *BlockHeader) Read(b []byte) (n int, err error)

func (*BlockHeader) ReadFrom

func (s *BlockHeader) ReadFrom(r io.Reader) (int64, error)

func (*BlockHeader) Savepoint

func (s *BlockHeader) Savepoint() int64

func (*BlockHeader) SavepointR

func (s *BlockHeader) SavepointR() int64

func (*BlockHeader) Seq

func (s *BlockHeader) Seq() uint16

func (*BlockHeader) Size

func (s *BlockHeader) Size() uint16

func (*BlockHeader) SizeU

func (s *BlockHeader) SizeU() uint16

func (*BlockHeader) SizeX

func (s *BlockHeader) SizeX() uint16

func (*BlockHeader) Start

func (s *BlockHeader) Start() int64

func (*BlockHeader) StreamID

func (s *BlockHeader) StreamID() int64

func (*BlockHeader) String

func (s *BlockHeader) String() string

func (*BlockHeader) UnmarshalBinary

func (s *BlockHeader) UnmarshalBinary(b []byte) error

func (*BlockHeader) UnmarshalCompactFrom

func (h *BlockHeader) UnmarshalCompactFrom(rd *Reader) error

func (*BlockHeader) WriteTo

func (s *BlockHeader) WriteTo(w io.Writer) (int64, error)

type BlockHeaderMut

type BlockHeaderMut struct {
	BlockHeader
}

BlockHeader

func (*BlockHeaderMut) Clone

func (s *BlockHeaderMut) Clone() *BlockHeaderMut

func (*BlockHeaderMut) Freeze

func (s *BlockHeaderMut) Freeze() *BlockHeader

func (*BlockHeaderMut) SetCompleted

func (s *BlockHeaderMut) SetCompleted(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetCompression

func (s *BlockHeaderMut) SetCompression(v Compression) *BlockHeaderMut

func (*BlockHeaderMut) SetCount

func (s *BlockHeaderMut) SetCount(v uint16) *BlockHeaderMut

func (*BlockHeaderMut) SetCreated

func (s *BlockHeaderMut) SetCreated(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetEnd

func (s *BlockHeaderMut) SetEnd(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetId

func (s *BlockHeaderMut) SetId(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetMax

func (s *BlockHeaderMut) SetMax(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetMin

func (s *BlockHeaderMut) SetMin(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetSavepoint

func (s *BlockHeaderMut) SetSavepoint(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetSavepointR

func (s *BlockHeaderMut) SetSavepointR(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetSeq

func (s *BlockHeaderMut) SetSeq(v uint16) *BlockHeaderMut

func (*BlockHeaderMut) SetSize

func (s *BlockHeaderMut) SetSize(v uint16) *BlockHeaderMut

func (*BlockHeaderMut) SetSizeU

func (s *BlockHeaderMut) SetSizeU(v uint16) *BlockHeaderMut

func (*BlockHeaderMut) SetSizeX

func (s *BlockHeaderMut) SetSizeX(v uint16) *BlockHeaderMut

func (*BlockHeaderMut) SetStart

func (s *BlockHeaderMut) SetStart(v int64) *BlockHeaderMut

func (*BlockHeaderMut) SetStreamID

func (s *BlockHeaderMut) SetStreamID(v int64) *BlockHeaderMut

type BlockID

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

BlockID represents a globally unique ID of a single page of a single stream. String representation

func NewBlockID

func NewBlockID(streamID, id int64) *BlockID

func (*BlockID) Bytes

func (s *BlockID) Bytes() []byte

func (*BlockID) Clone

func (s *BlockID) Clone() *BlockID

func (*BlockID) Id

func (s *BlockID) Id() int64

func (*BlockID) MarshalBinary

func (s *BlockID) MarshalBinary() ([]byte, error)

func (*BlockID) MarshalBinaryTo

func (s *BlockID) MarshalBinaryTo(b []byte) []byte

func (*BlockID) MarshalMap

func (s *BlockID) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*BlockID) Mut

func (s *BlockID) Mut() *BlockIDMut

func (*BlockID) Read

func (s *BlockID) Read(b []byte) (n int, err error)

func (*BlockID) ReadFrom

func (s *BlockID) ReadFrom(r io.Reader) (int64, error)

func (*BlockID) StreamID

func (s *BlockID) StreamID() int64

func (*BlockID) String

func (s *BlockID) String() string

func (*BlockID) UnmarshalBinary

func (s *BlockID) UnmarshalBinary(b []byte) error

func (*BlockID) WriteTo

func (s *BlockID) WriteTo(w io.Writer) (int64, error)

type BlockIDMut

type BlockIDMut struct {
	BlockID
}

BlockID represents a globally unique ID of a single page of a single stream. String representation

func (*BlockIDMut) Clone

func (s *BlockIDMut) Clone() *BlockIDMut

func (*BlockIDMut) Freeze

func (s *BlockIDMut) Freeze() *BlockID

func (*BlockIDMut) SetId

func (s *BlockIDMut) SetId(v int64) *BlockIDMut

func (*BlockIDMut) SetStreamID

func (s *BlockIDMut) SetStreamID(v int64) *BlockIDMut

type BlockIterator

type BlockIterator interface {
	Reset(d []byte) BlockIterator

	Prev() (*Record, error)

	Next() (*Record, error)
}

func NewBlockReader

func NewBlockReader(d []byte) BlockIterator

type BlockMessage

type BlockMessage struct {
	BlockHeaderMut
	Body []byte
}

func GetBlockMessage

func GetBlockMessage(size int) *BlockMessage

func GetBlockMessageWith

func GetBlockMessageWith(data []byte) *BlockMessage

func ToBlockMessage

func ToBlockMessage(b Block, compress bool) (*BlockMessage, error)

func (*BlockMessage) Clone

func (b *BlockMessage) Clone() *BlockMessage

func (*BlockMessage) Compress

func (b *BlockMessage) Compress() (*BlockMessage, error)

Compress creates a LZ4 compressed clone if not compressed, otherwise it returns itself.

func (*BlockMessage) CompressInline

func (b *BlockMessage) CompressInline() error

Compress compresses the block using LZ4 and replaces current data buffer

func (*BlockMessage) Data

func (b *BlockMessage) Data() []byte

func (*BlockMessage) Decompress

func (b *BlockMessage) Decompress() (*BlockMessage, error)

Decompress decompresses

func (*BlockMessage) DecompressInline

func (b *BlockMessage) DecompressInline() error

DecompressInline decompresses and replaces current data buffer

func (*BlockMessage) Header

func (b *BlockMessage) Header() *BlockHeader

func (*BlockMessage) HeaderMut

func (b *BlockMessage) HeaderMut() *BlockHeaderMut

func (*BlockMessage) MarshalCompactTo

func (b *BlockMessage) MarshalCompactTo(w *Writer) error

func (*BlockMessage) MarshalTo

func (b *BlockMessage) MarshalTo(w *Writer) error

func (*BlockMessage) MessageID

func (s *BlockMessage) MessageID() int64

func (*BlockMessage) Sizeof

func (b *BlockMessage) Sizeof() int

func (*BlockMessage) Timestamp

func (s *BlockMessage) Timestamp() int64

func (*BlockMessage) Type

func (b *BlockMessage) Type() MessageType

func (*BlockMessage) Unmarshal

func (b *BlockMessage) Unmarshal(header []byte, data []byte) error

func (*BlockMessage) UnmarshalCompactFrom

func (b *BlockMessage) UnmarshalCompactFrom(rd *Reader) error

func (*BlockMessage) UnmarshalFrom

func (b *BlockMessage) UnmarshalFrom(rd *Reader) error

type BlockMessageBuffer

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

func NewBlockMessageBuffer

func NewBlockMessageBuffer(maxLength, maxSize int, evicted OnBlockMessageEvicted) *BlockMessageBuffer

func (*BlockMessageBuffer) Clear

func (b *BlockMessageBuffer) Clear()

func (*BlockMessageBuffer) Copy

func (b *BlockMessageBuffer) Copy(to []*BlockMessage) []*BlockMessage

func (*BlockMessageBuffer) First

func (b *BlockMessageBuffer) First() *BlockMessage

func (*BlockMessageBuffer) IsFull

func (b *BlockMessageBuffer) IsFull() bool

func (*BlockMessageBuffer) Last

func (b *BlockMessageBuffer) Last() *BlockMessage

func (*BlockMessageBuffer) PopFirst

func (b *BlockMessageBuffer) PopFirst() *BlockMessage

func (*BlockMessageBuffer) PopLast

func (b *BlockMessageBuffer) PopLast() *BlockMessage

func (*BlockMessageBuffer) Push

func (b *BlockMessageBuffer) Push(block *BlockMessage)

func (*BlockMessageBuffer) PushNoEvict

func (b *BlockMessageBuffer) PushNoEvict(block *BlockMessage) bool

func (*BlockMessageBuffer) PushSequential

func (b *BlockMessageBuffer) PushSequential(block *BlockMessage) bool

func (*BlockMessageBuffer) Savepoint

func (b *BlockMessageBuffer) Savepoint(id int64)

PushSavepoint Clears all blocks <= supplied Block ID

type BlockMessageBuilder

type BlockMessageBuilder struct {
	BlockHeaderMut

	W Writer
	// contains filtered or unexported fields
}

BlockMessageBuilder forges new blocks for a stream

func (*BlockMessageBuilder) Alloc

func (bw *BlockMessageBuilder) Alloc(maxSize int) error

func (*BlockMessageBuilder) Append

func (bw *BlockMessageBuilder) Append(record *RecordMessage, completed []*BlockMessage) ([]*BlockMessage, int, error)

func (*BlockMessageBuilder) AppendBlock

func (bw *BlockMessageBuilder) AppendBlock(block *BlockMessage, completed []*BlockMessage) ([]*BlockMessage, int, error)

func (*BlockMessageBuilder) Clone

func (*BlockMessageBuilder) Data

func (bw *BlockMessageBuilder) Data() []byte

func (*BlockMessageBuilder) Flush

func (bw *BlockMessageBuilder) Flush(completed int64) *BlockMessage

func (*BlockMessageBuilder) HasCapacity

func (bw *BlockMessageBuilder) HasCapacity(size int) bool

func (*BlockMessageBuilder) Header

func (bw *BlockMessageBuilder) Header() *BlockHeaderMut

func (*BlockMessageBuilder) IsEmpty

func (bw *BlockMessageBuilder) IsEmpty() bool

func (*BlockMessageBuilder) Reset

func (bw *BlockMessageBuilder) Reset()

func (*BlockMessageBuilder) SetMaxSize

func (bw *BlockMessageBuilder) SetMaxSize(maxSize int)

func (*BlockMessageBuilder) SizeofRecord

func (bw *BlockMessageBuilder) SizeofRecord(record *RecordMessage) int

type BlockMessageWriter

type BlockMessageWriter struct {
	BlockHeaderMut
	W Writer
}

BlockMessageWriter reassembles blocks forged elsewhere. It adheres to the rules and limitations of Blocks.

func (*BlockMessageWriter) Append

func (bw *BlockMessageWriter) Append(record *RecordMessage) (*BlockMessage, error)

func (*BlockMessageWriter) AppendBlock

func (bw *BlockMessageWriter) AppendBlock(block *BlockMessage) (*BlockMessage, error)

AppendBlock assumes the block was created elsewhere and must build "as is".

func (*BlockMessageWriter) Clone

func (*BlockMessageWriter) Data

func (bw *BlockMessageWriter) Data() []byte

func (*BlockMessageWriter) Flush

func (bw *BlockMessageWriter) Flush(completed int64) *BlockMessage

func (*BlockMessageWriter) HasCapacity

func (bw *BlockMessageWriter) HasCapacity(size int) bool

func (*BlockMessageWriter) Header

func (bw *BlockMessageWriter) Header() *BlockHeaderMut

func (*BlockMessageWriter) IsEmpty

func (bw *BlockMessageWriter) IsEmpty() bool

func (*BlockMessageWriter) Reset

func (bw *BlockMessageWriter) Reset()

func (*BlockMessageWriter) SizeofRecord

func (bw *BlockMessageWriter) SizeofRecord(record *RecordMessage) int

type BlockMut

type BlockMut interface {
	Block

	HeaderMut() *BlockHeaderMut

	// Uncompress decompresses the LZ4 encoded input into the memory of BlockMut
	Uncompress(b []byte) error

	AppendRecord(id, created, time, end int64, data []byte) error
}

func GetBlockMut

func GetBlockMut(size int) BlockMut

type BlockWriter

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

BlockWriter simplifies building Blocks by appending 1 record at a time

func NewBlockWriter

func NewBlockWriter(max BlockHeaderMut, allocator BlockAllocator) *BlockWriter

func (*BlockWriter) Append

func (w *BlockWriter) Append(id, created, time, end int64, data []byte) (BlockMut, int64, uint16, error)

Append tries to append the next record returning a full Block once filled.

func (*BlockWriter) AppendRecord

func (w *BlockWriter) AppendRecord(record *RecordMessage) (BlockMut, int64, uint16, error)

Record tries to append the next record returning a full Block once filled.

func (*BlockWriter) Current

func (bw *BlockWriter) Current() BlockMut

func (*BlockWriter) NextBlock

func (w *BlockWriter) NextBlock() BlockMut

type Bytes16306

type Bytes16306 [16306]byte

func NewBytes16306

func NewBytes16306(s string) *Bytes16306

func (*Bytes16306) Bytes

func (s *Bytes16306) Bytes() []byte

func (*Bytes16306) Cap

func (s *Bytes16306) Cap() int

func (*Bytes16306) Clone

func (s *Bytes16306) Clone() *Bytes16306

func (*Bytes16306) Len

func (s *Bytes16306) Len() int

func (*Bytes16306) MarshalBinary

func (s *Bytes16306) MarshalBinary() ([]byte, error)

func (*Bytes16306) MarshalBinaryTo

func (s *Bytes16306) MarshalBinaryTo(b []byte) []byte

func (*Bytes16306) Mut

func (s *Bytes16306) Mut() *Bytes16306Mut

func (*Bytes16306) ReadFrom

func (s *Bytes16306) ReadFrom(r io.Reader) error

func (*Bytes16306) String

func (s *Bytes16306) String() string

func (*Bytes16306) UnmarshalBinary

func (s *Bytes16306) UnmarshalBinary(b []byte) error

func (*Bytes16306) Unsafe

func (s *Bytes16306) Unsafe() string

func (*Bytes16306) WriteTo

func (s *Bytes16306) WriteTo(w io.Writer) (n int, err error)

type Bytes16306Mut

type Bytes16306Mut struct {
	Bytes16306
}

func (*Bytes16306Mut) Set

func (s *Bytes16306Mut) Set(v string)

type Bytes1968

type Bytes1968 [1968]byte

func NewBytes1968

func NewBytes1968(s string) *Bytes1968

func (*Bytes1968) Bytes

func (s *Bytes1968) Bytes() []byte

func (*Bytes1968) Cap

func (s *Bytes1968) Cap() int

func (*Bytes1968) Clone

func (s *Bytes1968) Clone() *Bytes1968

func (*Bytes1968) Len

func (s *Bytes1968) Len() int

func (*Bytes1968) MarshalBinary

func (s *Bytes1968) MarshalBinary() ([]byte, error)

func (*Bytes1968) MarshalBinaryTo

func (s *Bytes1968) MarshalBinaryTo(b []byte) []byte

func (*Bytes1968) Mut

func (s *Bytes1968) Mut() *Bytes1968Mut

func (*Bytes1968) ReadFrom

func (s *Bytes1968) ReadFrom(r io.Reader) error

func (*Bytes1968) String

func (s *Bytes1968) String() string

func (*Bytes1968) UnmarshalBinary

func (s *Bytes1968) UnmarshalBinary(b []byte) error

func (*Bytes1968) Unsafe

func (s *Bytes1968) Unsafe() string

func (*Bytes1968) WriteTo

func (s *Bytes1968) WriteTo(w io.Writer) (n int, err error)

type Bytes1968Mut

type Bytes1968Mut struct {
	Bytes1968
}

func (*Bytes1968Mut) Set

func (s *Bytes1968Mut) Set(v string)

type Bytes32688

type Bytes32688 [32688]byte

func NewBytes32688

func NewBytes32688(s string) *Bytes32688

func (*Bytes32688) Bytes

func (s *Bytes32688) Bytes() []byte

func (*Bytes32688) Cap

func (s *Bytes32688) Cap() int

func (*Bytes32688) Clone

func (s *Bytes32688) Clone() *Bytes32688

func (*Bytes32688) Len

func (s *Bytes32688) Len() int

func (*Bytes32688) MarshalBinary

func (s *Bytes32688) MarshalBinary() ([]byte, error)

func (*Bytes32688) MarshalBinaryTo

func (s *Bytes32688) MarshalBinaryTo(b []byte) []byte

func (*Bytes32688) Mut

func (s *Bytes32688) Mut() *Bytes32688Mut

func (*Bytes32688) ReadFrom

func (s *Bytes32688) ReadFrom(r io.Reader) error

func (*Bytes32688) String

func (s *Bytes32688) String() string

func (*Bytes32688) UnmarshalBinary

func (s *Bytes32688) UnmarshalBinary(b []byte) error

func (*Bytes32688) Unsafe

func (s *Bytes32688) Unsafe() string

func (*Bytes32688) WriteTo

func (s *Bytes32688) WriteTo(w io.Writer) (n int, err error)

type Bytes32688Mut

type Bytes32688Mut struct {
	Bytes32688
}

func (*Bytes32688Mut) Set

func (s *Bytes32688Mut) Set(v string)

type Bytes4016

type Bytes4016 [4016]byte

func NewBytes4016

func NewBytes4016(s string) *Bytes4016

func (*Bytes4016) Bytes

func (s *Bytes4016) Bytes() []byte

func (*Bytes4016) Cap

func (s *Bytes4016) Cap() int

func (*Bytes4016) Clone

func (s *Bytes4016) Clone() *Bytes4016

func (*Bytes4016) Len

func (s *Bytes4016) Len() int

func (*Bytes4016) MarshalBinary

func (s *Bytes4016) MarshalBinary() ([]byte, error)

func (*Bytes4016) MarshalBinaryTo

func (s *Bytes4016) MarshalBinaryTo(b []byte) []byte

func (*Bytes4016) Mut

func (s *Bytes4016) Mut() *Bytes4016Mut

func (*Bytes4016) ReadFrom

func (s *Bytes4016) ReadFrom(r io.Reader) error

func (*Bytes4016) String

func (s *Bytes4016) String() string

func (*Bytes4016) UnmarshalBinary

func (s *Bytes4016) UnmarshalBinary(b []byte) error

func (*Bytes4016) Unsafe

func (s *Bytes4016) Unsafe() string

func (*Bytes4016) WriteTo

func (s *Bytes4016) WriteTo(w io.Writer) (n int, err error)

type Bytes4016Mut

type Bytes4016Mut struct {
	Bytes4016
}

func (*Bytes4016Mut) Set

func (s *Bytes4016Mut) Set(v string)

type Bytes65456

type Bytes65456 [65456]byte

func NewBytes65456

func NewBytes65456(s string) *Bytes65456

func (*Bytes65456) Bytes

func (s *Bytes65456) Bytes() []byte

func (*Bytes65456) Cap

func (s *Bytes65456) Cap() int

func (*Bytes65456) Clone

func (s *Bytes65456) Clone() *Bytes65456

func (*Bytes65456) Len

func (s *Bytes65456) Len() int

func (*Bytes65456) MarshalBinary

func (s *Bytes65456) MarshalBinary() ([]byte, error)

func (*Bytes65456) MarshalBinaryTo

func (s *Bytes65456) MarshalBinaryTo(b []byte) []byte

func (*Bytes65456) Mut

func (s *Bytes65456) Mut() *Bytes65456Mut

func (*Bytes65456) ReadFrom

func (s *Bytes65456) ReadFrom(r io.Reader) error

func (*Bytes65456) String

func (s *Bytes65456) String() string

func (*Bytes65456) UnmarshalBinary

func (s *Bytes65456) UnmarshalBinary(b []byte) error

func (*Bytes65456) Unsafe

func (s *Bytes65456) Unsafe() string

func (*Bytes65456) WriteTo

func (s *Bytes65456) WriteTo(w io.Writer) (n int, err error)

type Bytes65456Mut

type Bytes65456Mut struct {
	Bytes65456
}

func (*Bytes65456Mut) Set

func (s *Bytes65456Mut) Set(v string)

type Bytes8112

type Bytes8112 [8112]byte

func NewBytes8112

func NewBytes8112(s string) *Bytes8112

func (*Bytes8112) Bytes

func (s *Bytes8112) Bytes() []byte

func (*Bytes8112) Cap

func (s *Bytes8112) Cap() int

func (*Bytes8112) Clone

func (s *Bytes8112) Clone() *Bytes8112

func (*Bytes8112) Len

func (s *Bytes8112) Len() int

func (*Bytes8112) MarshalBinary

func (s *Bytes8112) MarshalBinary() ([]byte, error)

func (*Bytes8112) MarshalBinaryTo

func (s *Bytes8112) MarshalBinaryTo(b []byte) []byte

func (*Bytes8112) Mut

func (s *Bytes8112) Mut() *Bytes8112Mut

func (*Bytes8112) ReadFrom

func (s *Bytes8112) ReadFrom(r io.Reader) error

func (*Bytes8112) String

func (s *Bytes8112) String() string

func (*Bytes8112) UnmarshalBinary

func (s *Bytes8112) UnmarshalBinary(b []byte) error

func (*Bytes8112) Unsafe

func (s *Bytes8112) Unsafe() string

func (*Bytes8112) WriteTo

func (s *Bytes8112) WriteTo(w io.Writer) (n int, err error)

type Bytes8112Mut

type Bytes8112Mut struct {
	Bytes8112
}

func (*Bytes8112Mut) Set

func (s *Bytes8112Mut) Set(v string)

type Bytes944

type Bytes944 [944]byte

func NewBytes944

func NewBytes944(s string) *Bytes944

func (*Bytes944) Bytes

func (s *Bytes944) Bytes() []byte

func (*Bytes944) Cap

func (s *Bytes944) Cap() int

func (*Bytes944) Clone

func (s *Bytes944) Clone() *Bytes944

func (*Bytes944) Len

func (s *Bytes944) Len() int

func (*Bytes944) MarshalBinary

func (s *Bytes944) MarshalBinary() ([]byte, error)

func (*Bytes944) MarshalBinaryTo

func (s *Bytes944) MarshalBinaryTo(b []byte) []byte

func (*Bytes944) Mut

func (s *Bytes944) Mut() *Bytes944Mut

func (*Bytes944) ReadFrom

func (s *Bytes944) ReadFrom(r io.Reader) error

func (*Bytes944) String

func (s *Bytes944) String() string

func (*Bytes944) UnmarshalBinary

func (s *Bytes944) UnmarshalBinary(b []byte) error

func (*Bytes944) Unsafe

func (s *Bytes944) Unsafe() string

func (*Bytes944) WriteTo

func (s *Bytes944) WriteTo(w io.Writer) (n int, err error)

type Bytes944Mut

type Bytes944Mut struct {
	Bytes944
}

func (*Bytes944Mut) Set

func (s *Bytes944Mut) Set(v string)

type Compression

type Compression byte

type EOB

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

End of Block

func GetEOB

func GetEOB() *EOB

func (*EOB) Bytes

func (s *EOB) Bytes() []byte

func (*EOB) Clone

func (s *EOB) Clone() *EOB

func (*EOB) MarshalBinary

func (s *EOB) MarshalBinary() ([]byte, error)

func (*EOB) MarshalBinaryTo

func (s *EOB) MarshalBinaryTo(b []byte) []byte

func (*EOB) MarshalCompactTo

func (r *EOB) MarshalCompactTo(w *Writer) error

func (*EOB) MarshalMap

func (s *EOB) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*EOB) MessageID

func (s *EOB) MessageID() int64

func (*EOB) Mut

func (s *EOB) Mut() *EOBMut

func (*EOB) Read

func (s *EOB) Read(b []byte) (n int, err error)

func (*EOB) ReadFrom

func (s *EOB) ReadFrom(r io.Reader) (int64, error)

func (*EOB) RecordID

func (s *EOB) RecordID() *RecordID

func (*EOB) Savepoint

func (s *EOB) Savepoint() int64

func (*EOB) String

func (s *EOB) String() string

func (*EOB) Timestamp

func (s *EOB) Timestamp() int64

func (*EOB) Type

func (e *EOB) Type() MessageType

func (*EOB) UnmarshalBinary

func (s *EOB) UnmarshalBinary(b []byte) error

func (*EOB) UnmarshalCompactFrom

func (r *EOB) UnmarshalCompactFrom(rd *Reader) error

func (*EOB) WriteTo

func (s *EOB) WriteTo(w io.Writer) (int64, error)

type EOBMut

type EOBMut struct {
	EOB
}

End of Block

func (*EOBMut) Clone

func (s *EOBMut) Clone() *EOBMut

func (*EOBMut) Freeze

func (s *EOBMut) Freeze() *EOB

func (*EOBMut) RecordID

func (s *EOBMut) RecordID() *RecordIDMut

func (*EOBMut) SetRecordID

func (s *EOBMut) SetRecordID(v *RecordID) *EOBMut

func (*EOBMut) SetSavepoint

func (s *EOBMut) SetSavepoint(v int64) *EOBMut

func (*EOBMut) SetTimestamp

func (s *EOBMut) SetTimestamp(v int64) *EOBMut

type EOS

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

End of Stream The reader is caught up on the stream.

func GetEOS

func GetEOS() *EOS

func (*EOS) Bytes

func (s *EOS) Bytes() []byte

func (*EOS) Clone

func (s *EOS) Clone() *EOS

func (*EOS) Closed

func (s *EOS) Closed() bool

func (*EOS) MarshalBinary

func (s *EOS) MarshalBinary() ([]byte, error)

func (*EOS) MarshalBinaryTo

func (s *EOS) MarshalBinaryTo(b []byte) []byte

func (*EOS) MarshalCompactTo

func (r *EOS) MarshalCompactTo(w *Writer) error

func (*EOS) MarshalMap

func (s *EOS) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*EOS) MessageID

func (s *EOS) MessageID() int64

func (*EOS) Mut

func (s *EOS) Mut() *EOSMut

func (*EOS) Read

func (s *EOS) Read(b []byte) (n int, err error)

func (*EOS) ReadFrom

func (s *EOS) ReadFrom(r io.Reader) (int64, error)

func (*EOS) RecordID

func (s *EOS) RecordID() *RecordID

func (*EOS) String

func (s *EOS) String() string

func (*EOS) Timestamp

func (s *EOS) Timestamp() int64

func (*EOS) Type

func (e *EOS) Type() MessageType

func (*EOS) UnmarshalBinary

func (s *EOS) UnmarshalBinary(b []byte) error

func (*EOS) UnmarshalCompactFrom

func (r *EOS) UnmarshalCompactFrom(rd *Reader) error

func (*EOS) Waiting

func (s *EOS) Waiting() bool

func (*EOS) WriteTo

func (s *EOS) WriteTo(w io.Writer) (int64, error)

func (*EOS) WriterID

func (s *EOS) WriterID() int64

type EOSMut

type EOSMut struct {
	EOS
}

End of Stream The reader is caught up on the stream.

func (*EOSMut) Clone

func (s *EOSMut) Clone() *EOSMut

func (*EOSMut) Freeze

func (s *EOSMut) Freeze() *EOS

func (*EOSMut) RecordID

func (s *EOSMut) RecordID() *RecordIDMut

func (*EOSMut) SetClosed

func (s *EOSMut) SetClosed(v bool) *EOSMut

func (*EOSMut) SetRecordID

func (s *EOSMut) SetRecordID(v *RecordID) *EOSMut

func (*EOSMut) SetTimestamp

func (s *EOSMut) SetTimestamp(v int64) *EOSMut

func (*EOSMut) SetWaiting

func (s *EOSMut) SetWaiting(v bool) *EOSMut

func (*EOSMut) SetWriterID

func (s *EOSMut) SetWriterID(v int64) *EOSMut

type Message

type Message interface {
	Type() MessageType

	// Sequential ID of message
	MessageID() int64

	// Timestamp of the message
	Timestamp() int64

	MarshalBinary() ([]byte, error)

	UnmarshalBinary(b []byte) error

	MarshalCompactTo(w *Writer) error

	UnmarshalCompactFrom(rd *Reader) error
}

func UnmarshalMessageCompact

func UnmarshalMessageCompact(rd *Reader) (Message, error)

type MessageType

type MessageType byte

type OnBlockMessageEvicted

type OnBlockMessageEvicted func(block *BlockMessage)

type Progress

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

func GetProgress

func GetProgress() *Progress

func (*Progress) Bytes

func (s *Progress) Bytes() []byte

func (*Progress) Clone

func (s *Progress) Clone() *Progress

func (*Progress) Count

func (s *Progress) Count() int64

func (*Progress) MarshalBinary

func (s *Progress) MarshalBinary() ([]byte, error)

func (*Progress) MarshalBinaryTo

func (s *Progress) MarshalBinaryTo(b []byte) []byte

func (*Progress) MarshalCompactTo

func (s *Progress) MarshalCompactTo(w *Writer) error

func (*Progress) MarshalMap

func (s *Progress) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Progress) MessageID

func (s *Progress) MessageID() int64

func (*Progress) Mut

func (s *Progress) Mut() *ProgressMut

func (*Progress) Read

func (s *Progress) Read(b []byte) (n int, err error)

func (*Progress) ReadFrom

func (s *Progress) ReadFrom(r io.Reader) (int64, error)

func (*Progress) RecordID

func (s *Progress) RecordID() *RecordID

func (*Progress) Remaining

func (s *Progress) Remaining() int64

func (*Progress) Started

func (s *Progress) Started() int64

func (*Progress) String

func (s *Progress) String() string

func (*Progress) Timestamp

func (s *Progress) Timestamp() int64

func (*Progress) Type

func (s *Progress) Type() MessageType

func (*Progress) UnmarshalBinary

func (s *Progress) UnmarshalBinary(b []byte) error

func (*Progress) UnmarshalCompactFrom

func (s *Progress) UnmarshalCompactFrom(rd *Reader) error

func (*Progress) WriteTo

func (s *Progress) WriteTo(w io.Writer) (int64, error)

func (*Progress) WriterID

func (s *Progress) WriterID() int64

type ProgressMut

type ProgressMut struct {
	Progress
}

func (*ProgressMut) Clone

func (s *ProgressMut) Clone() *ProgressMut

func (*ProgressMut) Freeze

func (s *ProgressMut) Freeze() *Progress

func (*ProgressMut) RecordID

func (s *ProgressMut) RecordID() *RecordIDMut

func (*ProgressMut) SetCount

func (s *ProgressMut) SetCount(v int64) *ProgressMut

func (*ProgressMut) SetRecordID

func (s *ProgressMut) SetRecordID(v *RecordID) *ProgressMut

func (*ProgressMut) SetRemaining

func (s *ProgressMut) SetRemaining(v int64) *ProgressMut

func (*ProgressMut) SetStarted

func (s *ProgressMut) SetStarted(v int64) *ProgressMut

func (*ProgressMut) SetTimestamp

func (s *ProgressMut) SetTimestamp(v int64) *ProgressMut

func (*ProgressMut) SetWriterID

func (s *ProgressMut) SetWriterID(v int64) *ProgressMut

type Reader

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

func NewReader

func NewReader(b []byte) *Reader

func ReaderOf

func ReaderOf(b []byte) Reader

func (*Reader) At

func (r *Reader) At() int

func (*Reader) ReadBool

func (r *Reader) ReadBool() (bool, error)

func (*Reader) ReadByte

func (r *Reader) ReadByte() (byte, error)

func (*Reader) ReadBytes

func (r *Reader) ReadBytes(b []byte) error

func (*Reader) ReadBytesUnsafe

func (r *Reader) ReadBytesUnsafe(size int) ([]byte, error)

func (*Reader) ReadInt16

func (r *Reader) ReadInt16() (int16, error)

func (*Reader) ReadInt32

func (r *Reader) ReadInt32() (int32, error)

func (*Reader) ReadInt64

func (r *Reader) ReadInt64() (int64, error)

func (*Reader) ReadTag

func (r *Reader) ReadTag(x uint64) (WireNumber, WireType, error)

ReadTag decodes the field Number and wire Type from its unified form. The Number is -1 if the decoded field number overflows int32. Other than overflow, this does not check for field number validity.

func (*Reader) ReadUVarint16

func (r *Reader) ReadUVarint16() (uint16, int, error)

func (*Reader) ReadUVarint32

func (r *Reader) ReadUVarint32() (uint32, int, error)

func (*Reader) ReadUVarint64

func (r *Reader) ReadUVarint64() (uint64, int, error)

func (*Reader) ReadUint16

func (r *Reader) ReadUint16() (uint16, error)

func (*Reader) ReadUint32

func (r *Reader) ReadUint32() (uint32, error)

func (*Reader) ReadUint64

func (r *Reader) ReadUint64() (uint64, error)

func (*Reader) ReadVarint16

func (r *Reader) ReadVarint16() (int16, int, error)

func (*Reader) ReadVarint32

func (r *Reader) ReadVarint32() (int32, int, error)

func (*Reader) ReadVarint64

func (r *Reader) ReadVarint64() (int64, int, error)

func (*Reader) ReadVarintZigZag64

func (r *Reader) ReadVarintZigZag64() (int64, int, error)

func (*Reader) Remaining

func (r *Reader) Remaining() int

func (*Reader) Reset

func (r *Reader) Reset(b []byte)

type Record

type Record struct {
	ID        int64
	Timestamp int64
	Start     int64
	End       int64
	Data      []byte
}

type RecordHeader

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

func (*RecordHeader) BlockID

func (s *RecordHeader) BlockID() int64

func (*RecordHeader) Bytes

func (s *RecordHeader) Bytes() []byte

func (*RecordHeader) Clone

func (s *RecordHeader) Clone() *RecordHeader

func (*RecordHeader) Compression

func (s *RecordHeader) Compression() Compression

func (*RecordHeader) End

func (s *RecordHeader) End() int64

func (*RecordHeader) Eob

func (s *RecordHeader) Eob() bool

func (*RecordHeader) MarshalBinary

func (s *RecordHeader) MarshalBinary() ([]byte, error)

func (*RecordHeader) MarshalBinaryTo

func (s *RecordHeader) MarshalBinaryTo(b []byte) []byte

func (*RecordHeader) MarshalCompactTo

func (h *RecordHeader) MarshalCompactTo(w *Writer) error

func (*RecordHeader) MarshalMap

func (s *RecordHeader) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*RecordHeader) MessageID

func (s *RecordHeader) MessageID() int64

func (*RecordHeader) Mut

func (s *RecordHeader) Mut() *RecordHeaderMut

func (*RecordHeader) Read

func (s *RecordHeader) Read(b []byte) (n int, err error)

func (*RecordHeader) ReadFrom

func (s *RecordHeader) ReadFrom(r io.Reader) (int64, error)

func (*RecordHeader) Savepoint

func (s *RecordHeader) Savepoint() int64

func (*RecordHeader) SavepointR

func (s *RecordHeader) SavepointR() int64

func (*RecordHeader) Seq

func (s *RecordHeader) Seq() uint16

func (*RecordHeader) Size

func (s *RecordHeader) Size() uint16

func (*RecordHeader) SizeU

func (s *RecordHeader) SizeU() uint16

func (*RecordHeader) SizeX

func (s *RecordHeader) SizeX() uint16

func (*RecordHeader) Start

func (s *RecordHeader) Start() int64

func (*RecordHeader) StreamID

func (s *RecordHeader) StreamID() int64

func (*RecordHeader) String

func (s *RecordHeader) String() string

func (*RecordHeader) Timestamp

func (s *RecordHeader) Timestamp() int64

func (*RecordHeader) UnmarshalBinary

func (s *RecordHeader) UnmarshalBinary(b []byte) error

func (*RecordHeader) UnmarshalCompactFrom

func (r *RecordHeader) UnmarshalCompactFrom(rd *Reader) error

func (*RecordHeader) WriteTo

func (s *RecordHeader) WriteTo(w io.Writer) (int64, error)

type RecordHeaderMut

type RecordHeaderMut struct {
	RecordHeader
}

func (*RecordHeaderMut) Clone

func (s *RecordHeaderMut) Clone() *RecordHeaderMut

func (*RecordHeaderMut) Freeze

func (s *RecordHeaderMut) Freeze() *RecordHeader

func (*RecordHeaderMut) SetBlockID

func (s *RecordHeaderMut) SetBlockID(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetCompression

func (s *RecordHeaderMut) SetCompression(v Compression) *RecordHeaderMut

func (*RecordHeaderMut) SetEnd

func (s *RecordHeaderMut) SetEnd(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetEob

func (s *RecordHeaderMut) SetEob(v bool) *RecordHeaderMut

func (*RecordHeaderMut) SetId

func (s *RecordHeaderMut) SetId(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetSavepoint

func (s *RecordHeaderMut) SetSavepoint(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetSavepointR

func (s *RecordHeaderMut) SetSavepointR(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetSeq

func (s *RecordHeaderMut) SetSeq(v uint16) *RecordHeaderMut

func (*RecordHeaderMut) SetSize

func (s *RecordHeaderMut) SetSize(v uint16) *RecordHeaderMut

func (*RecordHeaderMut) SetSizeU

func (s *RecordHeaderMut) SetSizeU(v uint16) *RecordHeaderMut

func (*RecordHeaderMut) SetSizeX

func (s *RecordHeaderMut) SetSizeX(v uint16) *RecordHeaderMut

func (*RecordHeaderMut) SetStart

func (s *RecordHeaderMut) SetStart(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetStreamID

func (s *RecordHeaderMut) SetStreamID(v int64) *RecordHeaderMut

func (*RecordHeaderMut) SetTimestamp

func (s *RecordHeaderMut) SetTimestamp(v int64) *RecordHeaderMut

type RecordID

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

func (*RecordID) BlockID

func (s *RecordID) BlockID() int64

func (*RecordID) Bytes

func (s *RecordID) Bytes() []byte

func (*RecordID) Clone

func (s *RecordID) Clone() *RecordID

func (*RecordID) Id

func (s *RecordID) Id() int64

func (*RecordID) MarshalBinary

func (s *RecordID) MarshalBinary() ([]byte, error)

func (*RecordID) MarshalBinaryTo

func (s *RecordID) MarshalBinaryTo(b []byte) []byte

func (*RecordID) MarshalCompactTo

func (r *RecordID) MarshalCompactTo(w *Writer) error

func (*RecordID) MarshalMap

func (s *RecordID) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*RecordID) Mut

func (s *RecordID) Mut() *RecordIDMut

func (*RecordID) Read

func (s *RecordID) Read(b []byte) (n int, err error)

func (*RecordID) ReadFrom

func (s *RecordID) ReadFrom(r io.Reader) (int64, error)

func (*RecordID) StreamID

func (s *RecordID) StreamID() int64

func (*RecordID) String

func (s *RecordID) String() string

func (*RecordID) UnmarshalBinary

func (s *RecordID) UnmarshalBinary(b []byte) error

func (*RecordID) UnmarshalCompactFrom

func (r *RecordID) UnmarshalCompactFrom(rd *Reader) error

func (*RecordID) WriteTo

func (s *RecordID) WriteTo(w io.Writer) (int64, error)

type RecordIDMut

type RecordIDMut struct {
	RecordID
}

func (*RecordIDMut) Clone

func (s *RecordIDMut) Clone() *RecordIDMut

func (*RecordIDMut) Freeze

func (s *RecordIDMut) Freeze() *RecordID

func (*RecordIDMut) SetBlockID

func (s *RecordIDMut) SetBlockID(v int64) *RecordIDMut

func (*RecordIDMut) SetId

func (s *RecordIDMut) SetId(v int64) *RecordIDMut

func (*RecordIDMut) SetStreamID

func (s *RecordIDMut) SetStreamID(v int64) *RecordIDMut

type RecordMessage

type RecordMessage struct {
	RecordHeader
	Data []byte // Record data
}

RecordMessage represents a single record in a block. Appenders append as few as a single record at a time.

func GetRecord

func GetRecord(size int) *RecordMessage

func (*RecordMessage) CompressInline

func (r *RecordMessage) CompressInline() error

CompressInline compresses the entire block using LZ4

func (*RecordMessage) CompressedClone

func (r *RecordMessage) CompressedClone() (*RecordMessage, error)

CompressedClone creates a LZ4 compressed clone if not compressed, otherwise it returns itself.

func (*RecordMessage) Decompress

func (r *RecordMessage) Decompress() (*RecordMessage, error)

func (*RecordMessage) DecompressInline

func (r *RecordMessage) DecompressInline() error

func (*RecordMessage) MarshalCompactTo

func (r *RecordMessage) MarshalCompactTo(w *Writer) error

func (*RecordMessage) Type

func (r *RecordMessage) Type() MessageType

func (*RecordMessage) UnmarshalCompactFrom

func (r *RecordMessage) UnmarshalCompactFrom(rd *Reader) error

type Savepoint

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

func GetSavepoint

func GetSavepoint() *Savepoint

func (*Savepoint) Bytes

func (s *Savepoint) Bytes() []byte

func (*Savepoint) Clone

func (s *Savepoint) Clone() *Savepoint

func (*Savepoint) MarshalBinary

func (s *Savepoint) MarshalBinary() ([]byte, error)

func (*Savepoint) MarshalBinaryTo

func (s *Savepoint) MarshalBinaryTo(b []byte) []byte

func (*Savepoint) MarshalCompactTo

func (s *Savepoint) MarshalCompactTo(w *Writer) error

func (*Savepoint) MarshalMap

func (s *Savepoint) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Savepoint) MessageID

func (s *Savepoint) MessageID() int64

func (*Savepoint) Mut

func (s *Savepoint) Mut() *SavepointMut

func (*Savepoint) Read

func (s *Savepoint) Read(b []byte) (n int, err error)

func (*Savepoint) ReadFrom

func (s *Savepoint) ReadFrom(r io.Reader) (int64, error)

func (*Savepoint) RecordID

func (s *Savepoint) RecordID() *RecordID

func (*Savepoint) String

func (s *Savepoint) String() string

func (*Savepoint) Timestamp

func (s *Savepoint) Timestamp() int64

func (*Savepoint) Type

func (s *Savepoint) Type() MessageType

func (*Savepoint) UnmarshalBinary

func (s *Savepoint) UnmarshalBinary(b []byte) error

func (*Savepoint) UnmarshalCompactFrom

func (s *Savepoint) UnmarshalCompactFrom(rd *Reader) error

func (*Savepoint) WriteTo

func (s *Savepoint) WriteTo(w io.Writer) (int64, error)

func (*Savepoint) WriterID

func (s *Savepoint) WriterID() int64

type SavepointMut

type SavepointMut struct {
	Savepoint
}

func (*SavepointMut) Clone

func (s *SavepointMut) Clone() *SavepointMut

func (*SavepointMut) Freeze

func (s *SavepointMut) Freeze() *Savepoint

func (*SavepointMut) RecordID

func (s *SavepointMut) RecordID() *RecordIDMut

func (*SavepointMut) SetRecordID

func (s *SavepointMut) SetRecordID(v *RecordID) *SavepointMut

func (*SavepointMut) SetTimestamp

func (s *SavepointMut) SetTimestamp(v int64) *SavepointMut

func (*SavepointMut) SetWriterID

func (s *SavepointMut) SetWriterID(v int64) *SavepointMut

type SchemaKind

type SchemaKind byte

type Started

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

func GetStarted

func GetStarted() *Started

func (*Started) Bytes

func (s *Started) Bytes() []byte

func (*Started) Clone

func (s *Started) Clone() *Started

func (*Started) MarshalBinary

func (s *Started) MarshalBinary() ([]byte, error)

func (*Started) MarshalBinaryTo

func (s *Started) MarshalBinaryTo(b []byte) []byte

func (*Started) MarshalCompactTo

func (s *Started) MarshalCompactTo(w *Writer) error

func (*Started) MarshalMap

func (s *Started) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Started) MessageID

func (s *Started) MessageID() int64

func (*Started) Mut

func (s *Started) Mut() *StartedMut

func (*Started) Read

func (s *Started) Read(b []byte) (n int, err error)

func (*Started) ReadFrom

func (s *Started) ReadFrom(r io.Reader) (int64, error)

func (*Started) RecordID

func (s *Started) RecordID() *RecordID

func (*Started) Stops

func (s *Started) Stops() int64

func (*Started) String

func (s *Started) String() string

func (*Started) Timestamp

func (s *Started) Timestamp() int64

func (*Started) Type

func (s *Started) Type() MessageType

func (*Started) UnmarshalBinary

func (s *Started) UnmarshalBinary(b []byte) error

func (*Started) UnmarshalCompactFrom

func (s *Started) UnmarshalCompactFrom(rd *Reader) error

func (*Started) WriteTo

func (s *Started) WriteTo(w io.Writer) (int64, error)

func (*Started) WriterID

func (s *Started) WriterID() int64

type StartedMut

type StartedMut struct {
	Started
}

func (*StartedMut) Clone

func (s *StartedMut) Clone() *StartedMut

func (*StartedMut) Freeze

func (s *StartedMut) Freeze() *Started

func (*StartedMut) RecordID

func (s *StartedMut) RecordID() *RecordIDMut

func (*StartedMut) SetRecordID

func (s *StartedMut) SetRecordID(v *RecordID) *StartedMut

func (*StartedMut) SetStops

func (s *StartedMut) SetStops(v int64) *StartedMut

func (*StartedMut) SetTimestamp

func (s *StartedMut) SetTimestamp(v int64) *StartedMut

func (*StartedMut) SetWriterID

func (s *StartedMut) SetWriterID(v int64) *StartedMut

type Starting

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

func GetStarting

func GetStarting() *Starting

func (*Starting) Bytes

func (s *Starting) Bytes() []byte

func (*Starting) Clone

func (s *Starting) Clone() *Starting

func (*Starting) MarshalBinary

func (s *Starting) MarshalBinary() ([]byte, error)

func (*Starting) MarshalBinaryTo

func (s *Starting) MarshalBinaryTo(b []byte) []byte

func (*Starting) MarshalCompactTo

func (s *Starting) MarshalCompactTo(w *Writer) error

func (*Starting) MarshalMap

func (s *Starting) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Starting) MessageID

func (s *Starting) MessageID() int64

func (*Starting) Mut

func (s *Starting) Mut() *StartingMut

func (*Starting) Read

func (s *Starting) Read(b []byte) (n int, err error)

func (*Starting) ReadFrom

func (s *Starting) ReadFrom(r io.Reader) (int64, error)

func (*Starting) RecordID

func (s *Starting) RecordID() *RecordID

func (*Starting) String

func (s *Starting) String() string

func (*Starting) Timestamp

func (s *Starting) Timestamp() int64

func (*Starting) Type

func (s *Starting) Type() MessageType

func (*Starting) UnmarshalBinary

func (s *Starting) UnmarshalBinary(b []byte) error

func (*Starting) UnmarshalCompactFrom

func (s *Starting) UnmarshalCompactFrom(rd *Reader) error

func (*Starting) WriteTo

func (s *Starting) WriteTo(w io.Writer) (int64, error)

func (*Starting) WriterID

func (s *Starting) WriterID() int64

type StartingMut

type StartingMut struct {
	Starting
}

func (*StartingMut) Clone

func (s *StartingMut) Clone() *StartingMut

func (*StartingMut) Freeze

func (s *StartingMut) Freeze() *Starting

func (*StartingMut) RecordID

func (s *StartingMut) RecordID() *RecordIDMut

func (*StartingMut) SetRecordID

func (s *StartingMut) SetRecordID(v *RecordID) *StartingMut

func (*StartingMut) SetTimestamp

func (s *StartingMut) SetTimestamp(v int64) *StartingMut

func (*StartingMut) SetWriterID

func (s *StartingMut) SetWriterID(v int64) *StartingMut

type Stats

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

func (*Stats) Blocks

func (s *Stats) Blocks() int64

func (*Stats) Bytes

func (s *Stats) Bytes() []byte

func (*Stats) Clone

func (s *Stats) Clone() *Stats

func (*Stats) Count

func (s *Stats) Count() int64

func (*Stats) MarshalBinary

func (s *Stats) MarshalBinary() ([]byte, error)

func (*Stats) MarshalBinaryTo

func (s *Stats) MarshalBinaryTo(b []byte) []byte

func (*Stats) MarshalMap

func (s *Stats) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Stats) Mut

func (s *Stats) Mut() *StatsMut

func (*Stats) Read

func (s *Stats) Read(b []byte) (n int, err error)

func (*Stats) ReadFrom

func (s *Stats) ReadFrom(r io.Reader) (int64, error)

func (*Stats) Size

func (s *Stats) Size() int64

func (*Stats) String

func (s *Stats) String() string

func (*Stats) UnmarshalBinary

func (s *Stats) UnmarshalBinary(b []byte) error

func (*Stats) WriteTo

func (s *Stats) WriteTo(w io.Writer) (int64, error)

type StatsMut

type StatsMut struct {
	Stats
}

func (*StatsMut) Clone

func (s *StatsMut) Clone() *StatsMut

func (*StatsMut) Freeze

func (s *StatsMut) Freeze() *Stats

func (*StatsMut) SetBlocks

func (s *StatsMut) SetBlocks(v int64) *StatsMut

func (*StatsMut) SetCount

func (s *StatsMut) SetCount(v int64) *StatsMut

func (*StatsMut) SetSize

func (s *StatsMut) SetSize(v int64) *StatsMut

type StopReason

type StopReason byte

type Stopped

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

func GetStopped

func GetStopped() *Stopped

func (*Stopped) Bytes

func (s *Stopped) Bytes() []byte

func (*Stopped) Clone

func (s *Stopped) Clone() *Stopped

func (*Stopped) MarshalBinary

func (s *Stopped) MarshalBinary() ([]byte, error)

func (*Stopped) MarshalBinaryTo

func (s *Stopped) MarshalBinaryTo(b []byte) []byte

func (*Stopped) MarshalCompactTo

func (s *Stopped) MarshalCompactTo(w *Writer) error

func (*Stopped) MarshalMap

func (s *Stopped) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Stopped) MessageID

func (s *Stopped) MessageID() int64

func (*Stopped) Mut

func (s *Stopped) Mut() *StoppedMut

func (*Stopped) Read

func (s *Stopped) Read(b []byte) (n int, err error)

func (*Stopped) ReadFrom

func (s *Stopped) ReadFrom(r io.Reader) (int64, error)

func (*Stopped) Reason

func (s *Stopped) Reason() StopReason

func (*Stopped) RecordID

func (s *Stopped) RecordID() *RecordID

func (*Stopped) Starts

func (s *Stopped) Starts() int64

func (*Stopped) String

func (s *Stopped) String() string

func (*Stopped) Timestamp

func (s *Stopped) Timestamp() int64

func (*Stopped) Type

func (s *Stopped) Type() MessageType

func (*Stopped) UnmarshalBinary

func (s *Stopped) UnmarshalBinary(b []byte) error

func (*Stopped) UnmarshalCompactFrom

func (s *Stopped) UnmarshalCompactFrom(rd *Reader) error

func (*Stopped) WriteTo

func (s *Stopped) WriteTo(w io.Writer) (int64, error)

type StoppedMut

type StoppedMut struct {
	Stopped
}

func (*StoppedMut) Clone

func (s *StoppedMut) Clone() *StoppedMut

func (*StoppedMut) Freeze

func (s *StoppedMut) Freeze() *Stopped

func (*StoppedMut) RecordID

func (s *StoppedMut) RecordID() *RecordIDMut

func (*StoppedMut) SetReason

func (s *StoppedMut) SetReason(v StopReason) *StoppedMut

func (*StoppedMut) SetRecordID

func (s *StoppedMut) SetRecordID(v *RecordID) *StoppedMut

func (*StoppedMut) SetStarts

func (s *StoppedMut) SetStarts(v int64) *StoppedMut

func (*StoppedMut) SetTimestamp

func (s *StoppedMut) SetTimestamp(v int64) *StoppedMut

type Stream

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

func (*Stream) AccountID

func (s *Stream) AccountID() int64

func (*Stream) BlockSize

func (s *Stream) BlockSize() byte

func (*Stream) Bytes

func (s *Stream) Bytes() []byte

func (*Stream) Clone

func (s *Stream) Clone() *Stream

func (*Stream) Created

func (s *Stream) Created() int64

func (*Stream) Duration

func (s *Stream) Duration() int64

func (*Stream) Id

func (s *Stream) Id() int64

func (*Stream) Kind

func (s *Stream) Kind() StreamKind

func (*Stream) MarshalBinary

func (s *Stream) MarshalBinary() ([]byte, error)

func (*Stream) MarshalBinaryTo

func (s *Stream) MarshalBinaryTo(b []byte) []byte

func (*Stream) MarshalMap

func (s *Stream) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*Stream) Mut

func (s *Stream) Mut() *StreamMut

func (*Stream) Name

func (s *Stream) Name() *String32

func (*Stream) Read

func (s *Stream) Read(b []byte) (n int, err error)

func (*Stream) ReadFrom

func (s *Stream) ReadFrom(r io.Reader) (int64, error)

func (*Stream) RealTime

func (s *Stream) RealTime() bool

func (*Stream) Record

func (s *Stream) Record() int32

func (*Stream) Schema

func (s *Stream) Schema() SchemaKind

func (*Stream) String

func (s *Stream) String() string

func (*Stream) UnmarshalBinary

func (s *Stream) UnmarshalBinary(b []byte) error

func (*Stream) WriteTo

func (s *Stream) WriteTo(w io.Writer) (int64, error)

type StreamID

type StreamID int64

func GenerateStreamID

func GenerateStreamID(shard int16) StreamID

func NewStreamID

func NewStreamID(shard int16, id int64) StreamID

func (StreamID) DB

func (s StreamID) DB() int16

func (StreamID) ID

func (s StreamID) ID() int64

type StreamKind

type StreamKind byte

type StreamMut

type StreamMut struct {
	Stream
}

func (*StreamMut) Clone

func (s *StreamMut) Clone() *StreamMut

func (*StreamMut) Freeze

func (s *StreamMut) Freeze() *Stream

func (*StreamMut) Name

func (s *StreamMut) Name() *String32Mut

func (*StreamMut) SetAccountID

func (s *StreamMut) SetAccountID(v int64) *StreamMut

func (*StreamMut) SetBlockSize

func (s *StreamMut) SetBlockSize(v byte) *StreamMut

func (*StreamMut) SetCreated

func (s *StreamMut) SetCreated(v int64) *StreamMut

func (*StreamMut) SetDuration

func (s *StreamMut) SetDuration(v int64) *StreamMut

func (*StreamMut) SetId

func (s *StreamMut) SetId(v int64) *StreamMut

func (*StreamMut) SetKind

func (s *StreamMut) SetKind(v StreamKind) *StreamMut

func (*StreamMut) SetName

func (s *StreamMut) SetName(v *String32) *StreamMut

func (*StreamMut) SetRealTime

func (s *StreamMut) SetRealTime(v bool) *StreamMut

func (*StreamMut) SetRecord

func (s *StreamMut) SetRecord(v int32) *StreamMut

func (*StreamMut) SetSchema

func (s *StreamMut) SetSchema(v SchemaKind) *StreamMut

type StreamStats

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

func (*StreamStats) Appender

func (s *StreamStats) Appender() *Stats

func (*StreamStats) Bytes

func (s *StreamStats) Bytes() []byte

func (*StreamStats) Clone

func (s *StreamStats) Clone() *StreamStats

func (*StreamStats) MarshalBinary

func (s *StreamStats) MarshalBinary() ([]byte, error)

func (*StreamStats) MarshalBinaryTo

func (s *StreamStats) MarshalBinaryTo(b []byte) []byte

func (*StreamStats) MarshalMap

func (s *StreamStats) MarshalMap(m map[string]interface{}) map[string]interface{}

func (*StreamStats) Mut

func (s *StreamStats) Mut() *StreamStatsMut

func (*StreamStats) Read

func (s *StreamStats) Read(b []byte) (n int, err error)

func (*StreamStats) ReadFrom

func (s *StreamStats) ReadFrom(r io.Reader) (int64, error)

func (*StreamStats) Storage

func (s *StreamStats) Storage() *Stats

func (*StreamStats) String

func (s *StreamStats) String() string

func (*StreamStats) UnmarshalBinary

func (s *StreamStats) UnmarshalBinary(b []byte) error

func (*StreamStats) WriteTo

func (s *StreamStats) WriteTo(w io.Writer) (int64, error)

type StreamStatsMut

type StreamStatsMut struct {
	StreamStats
}

func (*StreamStatsMut) Appender

func (s *StreamStatsMut) Appender() *StatsMut

func (*StreamStatsMut) Clone

func (s *StreamStatsMut) Clone() *StreamStatsMut

func (*StreamStatsMut) Freeze

func (s *StreamStatsMut) Freeze() *StreamStats

func (*StreamStatsMut) SetAppender

func (s *StreamStatsMut) SetAppender(v *Stats) *StreamStatsMut

func (*StreamStatsMut) SetStorage

func (s *StreamStatsMut) SetStorage(v *Stats) *StreamStatsMut

func (*StreamStatsMut) Storage

func (s *StreamStatsMut) Storage() *StatsMut

type String32

type String32 [32]byte

func NewString32

func NewString32(s string) *String32

func (*String32) Bytes

func (s *String32) Bytes() []byte

func (*String32) Cap

func (s *String32) Cap() int

func (*String32) Clone

func (s *String32) Clone() *String32

func (*String32) Len

func (s *String32) Len() int

func (*String32) MarshalBinary

func (s *String32) MarshalBinary() ([]byte, error)

func (*String32) MarshalBinaryTo

func (s *String32) MarshalBinaryTo(b []byte) []byte

func (*String32) Mut

func (s *String32) Mut() *String32Mut

func (*String32) ReadFrom

func (s *String32) ReadFrom(r io.Reader) error

func (*String32) String

func (s *String32) String() string

func (*String32) UnmarshalBinary

func (s *String32) UnmarshalBinary(b []byte) error

func (*String32) Unsafe

func (s *String32) Unsafe() string

func (*String32) WriteTo

func (s *String32) WriteTo(w io.Writer) (n int, err error)

type String32Mut

type String32Mut struct {
	String32
}

func (*String32Mut) Set

func (s *String32Mut) Set(v string)

type WireNumber

type WireNumber int32

WireNumber represents the field number.

const (
	MinValidNumber      WireNumber = 1
	FirstReservedNumber WireNumber = 19000
	LastReservedNumber  WireNumber = 19999
	MaxValidNumber      WireNumber = 1<<29 - 1
)

func (WireNumber) IsValid

func (n WireNumber) IsValid() bool

IsValid reports whether the field number is semantically valid.

Note that while numbers within the reserved range are semantically invalid, they are syntactically valid in the wire format. Implementations may treat records with reserved field numbers as unknown.

type WireType

type WireType int8

WireType represents the wire type.

const (
	VarintType     WireType = 0
	Fixed32Type    WireType = 5
	Fixed64Type    WireType = 1
	BytesType      WireType = 2
	StartGroupType WireType = 3
	EndGroupType   WireType = 4
)

type Writer

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

func (*Writer) Alloc

func (w *Writer) Alloc()

func (*Writer) At

func (w *Writer) At() int

func (*Writer) Clone

func (w *Writer) Clone() Writer

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Ensure

func (w *Writer) Ensure(n int) error

func (*Writer) Remaining

func (w *Writer) Remaining() int

func (*Writer) Reset

func (w *Writer) Reset()

func (*Writer) Size

func (w *Writer) Size() int

func (*Writer) Take

func (w *Writer) Take() []byte

func (*Writer) Write

func (w *Writer) Write(value []byte) error

func (*Writer) WriteBool

func (w *Writer) WriteBool(value bool) error

func (*Writer) WriteByte

func (w *Writer) WriteByte(value byte) error

func (*Writer) WriteInt16

func (w *Writer) WriteInt16(value int16) error

func (*Writer) WriteInt32

func (w *Writer) WriteInt32(value int32) error

func (*Writer) WriteInt64

func (w *Writer) WriteInt64(value int64) error

func (*Writer) WriteString

func (w *Writer) WriteString(s string) error

func (*Writer) WriteTag

func (w *Writer) WriteTag(num WireNumber, typ WireType) (int, error)

WriteTag encodes the field Number and wire Type into its unified form.

func (*Writer) WriteUVarint16

func (w *Writer) WriteUVarint16(value uint16) (int, error)

func (*Writer) WriteUVarint32

func (w *Writer) WriteUVarint32(value uint32) (int, error)

func (*Writer) WriteUVarint64

func (w *Writer) WriteUVarint64(value uint64) (int, error)

func (*Writer) WriteUint16

func (w *Writer) WriteUint16(value uint16) error

func (*Writer) WriteUint32

func (w *Writer) WriteUint32(value uint32) error

func (*Writer) WriteUint64

func (w *Writer) WriteUint64(value uint64) error

func (*Writer) WriteVarint16

func (w *Writer) WriteVarint16(value int16) (int, error)

func (*Writer) WriteVarint32

func (w *Writer) WriteVarint32(value int32) (int, error)

func (*Writer) WriteVarint64

func (w *Writer) WriteVarint64(value int64) (int, error)

func (*Writer) WriteVarintZigZag64

func (w *Writer) WriteVarintZigZag64(value int64) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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