bigquery

package
v0.0.0-...-545f17a Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client *managedwriter.Client, log *slog.Logger, meter metric.Meter, baseDir string) (*bq, error)

func PlencDescriptorToProtobuf

func PlencDescriptorToProtobuf(pd *plenccodec.Descriptor) (*descriptorpb.DescriptorProto, error)

Types

type DiskReadManager

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

func NewDiskReadManager

func NewDiskReadManager(baseDir string, log *slog.Logger, meter metric.Meter, chanForDescriptor chanForDescriptor) (*DiskReadManager, error)

func (*DiskReadManager) Start

func (drm *DiskReadManager) Start(ctx context.Context)

func (*DiskReadManager) Stop

func (drm *DiskReadManager) Stop()

type Uploader

type Uploader interface {
	// bufferFor returns a buffer of exactly size bytes.
	BufferFor(size int) []byte

	// add is called to note that the buffer returned by bufferFor was used and
	// is full of useful data,
	Add(buf []byte)

	Flush()

	// TryFlush attempts to flush the buffer to the table writer. It will not spill to disk.
	TryFlush()
}

type UploaderFactory

type UploaderFactory func(ctx context.Context, desc *protocol.ConnectionDescriptor) (Uploader, error)

Jump to

Keyboard shortcuts

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