client

package
v0.0.0-...-914b177 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JSONSchema string

Functions

func New

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

Types

type Client

type Client struct {
	Meilisearch *meilisearch.Client

	plugin.UnimplementedSource
	batchwriter.UnimplementedDeleteRecord
	// contains filtered or unexported fields
}

func (*Client) Close

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

func (*Client) DeleteStale

func (*Client) MigrateTables

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

func (*Client) Read

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

func (*Client) Write

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

func (*Client) WriteTableBatch

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

type Spec

type Spec struct {
	// A Meilisearch instance host & port to use.
	// If your Meilisearch instance uses private SSL certificate, make sure to specify `ca_cert` option, too.
	Host string `json:"host" jsonschema:"required,minLength=1"`

	//   Meilisearch API key, granted the following actions:
	//
	//  - `documents.add`
	//  - `indexes.create`
	//  - `indexes.get`
	//  - `indexes.update`
	//  - `tasks.get`
	//  - `settings.get`
	//  - `settings.update`
	//  - `version`
	APIKey string `json:"api_key" jsonschema:"required,minLength=1"`

	// Meilisearch API client timeout.
	Timeout *configtype.Duration `json:"timeout,omitempty"`

	//  PEM-encoded certificate authorities.
	//  When set, a certificate pool will be created by appending the certificates to the system pool.
	//  See [file variable substitution](/docs/advanced-topics/environment-variable-substitution#file-variable-substitution-example) for how to read this value from a file.
	CACert string `json:"ca_cert,omitempty"`

	// Maximum amount of items that may be grouped together to be written in a single write.
	BatchSize int `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 int `json:"batch_size_bytes,omitempty" jsonschema:"minimum=1,default=4194304"`

	// Timeout for writing a single batch.
	BatchTimeout *configtype.Duration `json:"batch_timeout,omitempty"`
}

func (Spec) JSONSchemaExtend

func (Spec) JSONSchemaExtend(sc *jsonschema.Schema)

Directories

Path Synopsis
spec
gen

Jump to

Keyboard shortcuts

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