server

package
v0.0.0-...-0797ecb Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectorServer

func NewConnectorServer() fivetran_sdk.ConnectorServer

func SourceFromRequest

func SourceFromRequest(request ConfiguredRequest) (*lib.PlanetScaleSource, error)

SourceFromRequest extracts the required configuration values from the map and returns a usable PlanetScaleSource to connect to a PlanetScale database.

func StateFromRequest

func StateFromRequest(logger handlers.Serializer, request StatefulRequest, source lib.PlanetScaleSource, shards []string, schemaSelection fivetransdk.Selection_WithSchema) (*lib.SyncState, error)

StateFromRequest unmarshals the stateJson saved in Fivetran and turns that into a structure we can use within the connector to incrementally sync tables from PlanetScale.

Types

type CheckConnectionHandler

type CheckConnectionHandler interface {
	Handle(context.Context, lib.ConnectClient, string, *lib.PlanetScaleSource) (*fivetransdk.TestResponse, error)
}

func NewCheckConnectionHandler

func NewCheckConnectionHandler() CheckConnectionHandler

type ConfigurationFormHandler

type ConfigurationFormHandler interface {
	Handle(context.Context, *fivetransdk.ConfigurationFormRequest) (*fivetransdk.ConfigurationFormResponse, error)
}

func NewConfigurationFormHandler

func NewConfigurationFormHandler() ConfigurationFormHandler

type ConfiguredRequest

type ConfiguredRequest interface {
	GetConfiguration() map[string]string
}

ConfiguredRequest is a grpc request that contains a Configuration in the payload. current examples are : Test, Schema & Update

type SchemaHandler

type SchemaHandler interface {
	Handle(context.Context, *lib.PlanetScaleSource, *lib.MysqlClient) (*fivetransdk.SchemaResponse, error)
}

func NewSchemaHandler

func NewSchemaHandler() SchemaHandler

type StatefulRequest

type StatefulRequest interface {
	GetStateJson() string
}

StatefulRequest is a grpc request that contains sync state in the payload. current examples are : Update

type SyncHandler

func NewSyncHandler

func NewSyncHandler() SyncHandler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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