buffer

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

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

Batch holds information for sending rows batch

func NewBatch

func NewBatch(rows []RowSlice) *Batch

NewBatch creates new batch

func (*Batch) Rows

func (b *Batch) Rows() []RowSlice

type Buffer

type Buffer interface {
	Write(RowSlice)
	Read() []RowSlice
	Len() int
	Flush()
}

Buffer it is the interface for creating a data buffer (temporary storage). It is enough to implement this interface so that you can use your own temporary storage

type Inline

type Inline interface {
	Row() RowSlice
}

Inline interface is an assistant in the correct formation of the order of fields in the data before sending it to Clickhouse

type RowDecoded

type RowDecoded string

func (RowDecoded) Decode

func (rd RowDecoded) Decode() (RowSlice, error)

Decode This method is required to reverse deserialize an array of bytes in a RowSlice type

type RowSlice

type RowSlice []interface{}

func (RowSlice) Encode

func (rw RowSlice) Encode() ([]byte, error)

Encode turns the RowSlice type into an array of bytes. This method is used for data serialization and storage in remote buffers, such as redis.Buffer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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