Documentation
¶
Index ¶
- func Decode(r io.Reader, wreck *Chunk) error
- func Encode(w io.Writer, wreck *Chunk) error
- func NewReaderJSON(r io.Reader, withGzip bool) (io.Reader, error)
- func NewWriterJSON(w io.Writer, withGzip bool) io.WriteCloser
- type Chunk
- type Decoder
- type Encoder
- type Scanner
- func (codec *Scanner[T]) Err() error
- func (codec *Scanner[T]) Scan() bool
- func (codec *Scanner[T]) SortKey() []uint8
- func (codec *Scanner[T]) UniqueKey() []uint8
- func (codec *Scanner[T]) Vector() []T
- func (codec *Scanner) WithDecoder(fmap func([]uint8) []T)
- func (codec *Scanner) WithMaxSortKey(v int)
- func (codec *Scanner) WithMaxUniqueKey(v int)
- func (codec *Scanner) WithMaxVector(v int)
- type Writer
- type WriterJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReaderJSON ¶ added in v0.0.2
Create input stream to read vectors from [json.RawMessage].
func NewWriterJSON ¶ added in v0.0.2
func NewWriterJSON(w io.Writer, withGzip bool) io.WriteCloser
Create output stream for of vectors to be used as [json.RawMessage].
Types ¶
type Decoder ¶ added in v0.0.2
type Decoder[T any] struct { // contains filtered or unexported fields }
Decode binary packet to vector
func NewDecoder ¶ added in v0.0.2
func (*Decoder) WithDecoder ¶ added in v0.0.2
func (codec *Decoder) WithDecoder(fmap func([]uint8) []T)
func (*Decoder) WithMaxSortKey ¶ added in v0.0.2
func (codec *Decoder) WithMaxSortKey(v int)
func (*Decoder) WithMaxUniqueKey ¶ added in v0.0.2
func (codec *Decoder) WithMaxUniqueKey(v int)
func (*Decoder) WithMaxVector ¶ added in v0.0.2
func (codec *Decoder) WithMaxVector(v int)
type Encoder ¶ added in v0.0.2
type Encoder[T any] struct { // contains filtered or unexported fields }
Encode single vector as binary packet
func NewEncoder ¶ added in v0.0.2
func (*Encoder) WithEncoder ¶ added in v0.0.2
func (codec *Encoder) WithEncoder(fmap func([]T) []uint8)
func (*Encoder) WithMaxSortKey ¶ added in v0.0.2
func (codec *Encoder) WithMaxSortKey(v int)
func (*Encoder) WithMaxUniqueKey ¶ added in v0.0.2
func (codec *Encoder) WithMaxUniqueKey(v int)
func (*Encoder) WithMaxVector ¶ added in v0.0.2
func (codec *Encoder) WithMaxVector(v int)
type Scanner ¶
type Scanner[T any] struct { // contains filtered or unexported fields }
Vector stream
func (*Scanner) WithDecoder ¶
func (codec *Scanner) WithDecoder(fmap func([]uint8) []T)
func (*Scanner) WithMaxSortKey ¶ added in v0.0.2
func (codec *Scanner) WithMaxSortKey(v int)
func (*Scanner) WithMaxUniqueKey ¶ added in v0.0.2
func (codec *Scanner) WithMaxUniqueKey(v int)
func (*Scanner) WithMaxVector ¶ added in v0.0.2
func (codec *Scanner) WithMaxVector(v int)
type Writer ¶
type Writer[T any] struct { // contains filtered or unexported fields }
Binary stream vector writer
func (*Writer) WithEncoder ¶
func (codec *Writer) WithEncoder(fmap func([]T) []uint8)
func (*Writer) WithMaxSortKey ¶ added in v0.0.2
func (codec *Writer) WithMaxSortKey(v int)
func (*Writer) WithMaxUniqueKey ¶ added in v0.0.2
func (codec *Writer) WithMaxUniqueKey(v int)
func (*Writer) WithMaxVector ¶ added in v0.0.2
func (codec *Writer) WithMaxVector(v int)
type WriterJSON ¶ added in v0.0.2
type WriterJSON []io.WriteCloser
Output stream for of vectors to be used as [json.RawMessage]. The stream is base64 encoded string "H4sI...eQCAN" compatible with Golang's []byte JSON encoding protocol.
func (WriterJSON) Close ¶ added in v0.0.2
func (w WriterJSON) Close() error
Click to show internal directories.
Click to hide internal directories.