s3select

package
v0.0.0-...-936ba1f Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetProgress

type GetProgress func() (bytesScanned int64, bytesProcessed int64)

GetProgress is a callback function that periodically retrieves the current values for the following if not nil. This is used to send Progress messages back to client. BytesScanned => Number of bytes that have been processed before being uncompressed (if the file is compressed). BytesProcessed => Number of bytes that have been processed after being uncompressed (if the file is compressed).

type MessageHandler

type MessageHandler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMessageHandler

func NewMessageHandler(ctx context.Context, w *bufio.Writer, getProgressFunc GetProgress) *MessageHandler

NewMessageHandler creates a new MessageHandler instance and starts the event streaming

func (*MessageHandler) Finish

func (mh *MessageHandler) Finish(bytesScanned, bytesProcessed int64) error

Finish terminates message stream with Stats and End message generates stats and end message using function args based on: BytesScanned => Number of bytes that have been processed before being uncompressed (if the file is compressed). BytesProcessed => Number of bytes that have been processed after being uncompressed (if the file is compressed).

func (*MessageHandler) FinishWithError

func (mh *MessageHandler) FinishWithError(errorCode, errorMessage string) error

FinishWithError terminates event stream with error

func (*MessageHandler) SendRecord

func (mh *MessageHandler) SendRecord(payload []byte) error

SendRecord sends a single Records message

Jump to

Keyboard shortcuts

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