Documentation ¶
Index ¶
- Constants
- func CallBackUntilFirstBlock(ctx context.Context, respStream <-chan response.Packet, ...) (*data.Block, error)
- func HandleInsertFromFmtStream(ctx context.Context, respStream <-chan response.Packet, ...) (int, error)
- type CallBackResp
- type CancelInsert
- type InsertOption
- type InsertProcess
- func (p *InsertProcess) BatchSize() int
- func (p *InsertProcess) Error() error
- func (p *InsertProcess) Finish() (int, error)
- func (p *InsertProcess) NumColumns() int
- func (p *InsertProcess) Sample() *data.Block
- func (p *InsertProcess) Start(ctx context.Context, inputBlockStream <-chan *data.Block, ...)
- type Logf
- type SendBlock
Constants ¶
View Source
const ShortRowsWriteErrFmt = "short rows write to server, rows read = %d, rows sent = %d"
Variables ¶
This section is empty.
Functions ¶
func CallBackUntilFirstBlock ¶
func HandleInsertFromFmtStream ¶
func HandleInsertFromFmtStream( ctx context.Context, respStream <-chan response.Packet, blockReader format.BlockStreamFmtReader, sendBlock SendBlock, cancelInsert CancelInsert, handleResp CallBackResp, opts ...InsertOption, ) (int, error)
Types ¶
type CallBackResp ¶
type CancelInsert ¶
type CancelInsert func()
type InsertOption ¶
type InsertOption func(process *InsertProcess)
func OptionAddCallBackResp ¶
func OptionAddCallBackResp(callback CallBackResp) InsertOption
func OptionAddLogf ¶
func OptionAddLogf(logf2 Logf) InsertOption
func OptionBatchSize ¶
func OptionBatchSize(n int) InsertOption
type InsertProcess ¶
type InsertProcess struct {
// contains filtered or unexported fields
}
func NewInsertProcess ¶
func NewInsertProcess(sample *data.Block, sendBlock SendBlock, cancelInsert CancelInsert, opts ...InsertOption) *InsertProcess
func (*InsertProcess) BatchSize ¶
func (p *InsertProcess) BatchSize() int
func (*InsertProcess) Error ¶
func (p *InsertProcess) Error() error
func (*InsertProcess) Finish ¶
func (p *InsertProcess) Finish() (int, error)
func (*InsertProcess) NumColumns ¶
func (p *InsertProcess) NumColumns() int
func (*InsertProcess) Sample ¶
func (p *InsertProcess) Sample() *data.Block
Click to show internal directories.
Click to hide internal directories.