client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 31 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

This section is empty.

Functions

func New

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

Types

type Client

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

func (*Client) Close

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

func (*Client) DeleteStaleBatch

func (c *Client) DeleteStaleBatch(ctx context.Context, messages message.WriteDeleteStales) error

DeleteStaleBatch deletes stale records from the destination table. It forms part of the writer.MixedBatchWriter interface.

func (*Client) InsertBatch

func (c *Client) InsertBatch(ctx context.Context, messages message.WriteInserts) error

InsertBatch inserts records into the destination table. It forms part of the writer.MixedBatchWriter interface.

func (*Client) MigrateTableBatch

func (c *Client) MigrateTableBatch(ctx context.Context, messages message.WriteMigrateTables) error

MigrateTableBatch migrates a table. It forms part of the writer.MixedBatchWriter interface.

func (*Client) PgToSchemaType

func (c *Client) PgToSchemaType(t string) arrow.DataType

func (*Client) Read

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

func (*Client) SchemaTypeToPg

func (c *Client) SchemaTypeToPg(t arrow.DataType) string

func (*Client) Write

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

type LogLevel

type LogLevel int
const (
	LogLevelError LogLevel = iota
	LogLevelWarn
	LogLevelInfo
	LogLevelDebug
	LogLevelTrace
)

func (*LogLevel) MarshalJSON

func (r *LogLevel) MarshalJSON() ([]byte, error)

func (*LogLevel) String

func (r *LogLevel) String() string

func (*LogLevel) UnmarshalJSON

func (r *LogLevel) UnmarshalJSON(data []byte) (err error)

type Spec

type Spec struct {
	ConnectionString string              `json:"connection_string,omitempty"`
	PgxLogLevel      LogLevel            `json:"pgx_log_level,omitempty"`
	BatchSize        int                 `json:"batch_size,omitempty"`
	BatchSizeBytes   int                 `json:"batch_size_bytes,omitempty"`
	BatchTimeout     configtype.Duration `json:"batch_timeout,omitempty"`
	CustomCQIDSalt   string              `json:"custom_cqid_salt,omitempty"`
}

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

Jump to

Keyboard shortcuts

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