Documentation
¶
Index ¶
- func NewConnectorServer() fivetran_sdk.ConnectorServer
- func SourceFromRequest(request ConfiguredRequest) (*lib.PlanetScaleSource, error)
- func StateFromRequest(logger handlers.Serializer, request StatefulRequest, ...) (*lib.SyncState, error)
- type CheckConnectionHandler
- type ConfigurationFormHandler
- type ConfiguredRequest
- type SchemaHandler
- type StatefulRequest
- type SyncHandler
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 ¶
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 ¶
type SyncHandler interface {
Handle(*lib.PlanetScaleSource, *lib.ConnectClient, handlers.Serializer, *lib.SyncState, *fivetransdk.Selection_WithSchema) error
}
func NewSyncHandler ¶
func NewSyncHandler() SyncHandler
Click to show internal directories.
Click to hide internal directories.