client

package
v0.0.0-...-7332e2e Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MPL-2.0 Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JSONSchema string

Functions

func New

func New(ctx context.Context, logger zerolog.Logger, spec []byte, _ plugin.NewClientOptions) (plugin.Client, error)

func TestConnection

func TestConnection(ctx context.Context, _ zerolog.Logger, specBytes []byte) error

Types

type Client

type Client struct {
	plugin.UnimplementedSource
	batchwriter.UnimplementedDeleteRecord
	// contains filtered or unexported fields
}

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

func (*Client) DeleteStale

func (c *Client) DeleteStale(ctx context.Context, msgs message.WriteDeleteStales) error

func (*Client) MigrateTables

func (c *Client) MigrateTables(ctx context.Context, msgs message.WriteMigrateTables) error

Migrate migrates to the latest schema

func (*Client) Read

func (c *Client) Read(ctx context.Context, table *schema.Table, res chan<- arrow.Record) error

func (*Client) Write

func (c *Client) Write(ctx context.Context, msgs <-chan message.WriteMessage) error

func (*Client) WriteTableBatch

func (c *Client) WriteTableBatch(ctx context.Context, name string, msgs message.WriteInserts) error

type Spec

type Spec struct {
	// Absolute or relative path to a file, such as `./example.duckdb`
	ConnectionString string `json:"connection_string,omitempty" jsonschema:"required,minLength=1"`

	// Maximum number of items that may be grouped together to be written in a single write.
	BatchSize int64 `json:"batch_size,omitempty" jsonschema:"minimum=1,default=1000"`

	// Maximum size of items that may be grouped together to be written in a single write.
	BatchSizeBytes int64 `json:"batch_size_bytes,omitempty" jsonschema:"minimum=1,default=4194304"`

	// Enables debug logging
	Debug bool `json:"debug,omitempty" jsonschema:"default=false"`
}

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

Directories

Path Synopsis
spec
gen command

Jump to

Keyboard shortcuts

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