Documentation ¶
Index ¶
- Variables
- func Destination[T Provider](lgr log.Logger, registry metrics.Registry, cp coordinator.Coordinator, ...) (T, bool)
- func Register(providerType abstract.ProviderType, fac ProviderFactory)
- func Source[T Provider](lgr log.Logger, registry metrics.Registry, cp coordinator.Coordinator, ...) (T, bool)
- type Abstract2Provider
- type Abstract2Sinker
- type ActivateCallbacks
- type Activator
- type AsyncSinker
- type Cleaner
- type Cleanuper
- type Deactivator
- type Provider
- type ProviderFactory
- type Replication
- type Sampleable
- type Sinker
- type Snapshot
- type SnapshotSinker
- type Sniffer
- type TMPCleaner
- type TablesOperationFunc
- type Tester
- type Updater
- type Verifier
Constants ¶
This section is empty.
Variables ¶
var ( NetworkUnreachable = coded.Register("generic", "network", "unreachable") UnknownCluster = coded.Register("generic", "unknown_cluster") InvalidCredential = coded.Register("generic", "invalid_credentials") // MissingData means that user asked for a table / topic / object wich is not exists on a source side MissingData = coded.Register("generic", "missing_data") // DataOutOfRange means data type is correct but the value is outside the supported range DataOutOfRange = coded.Register("data", "out_of_range") // UnsupportedConversion means the source data type cannot be converted into the target data type UnsupportedConversion = coded.Register("data", "unsupported_type_conversion") // DataValueError means there is something wrong with the value itself (i.e value []byte("foo") cannot be put into Decimal field) DataValueError = coded.Register("data", "value_error") )
Functions ¶
func Destination ¶
func Destination[T Provider](lgr log.Logger, registry metrics.Registry, cp coordinator.Coordinator, transfer *server.Transfer) (T, bool)
Destination resolve a specific provider interface from registry by `transfer.DstType()` provider type.
func Register ¶
func Register(providerType abstract.ProviderType, fac ProviderFactory)
Register add new provider factory to known providers registry.
Types ¶
type Abstract2Provider ¶
type Abstract2Provider interface { Provider DataProvider() (base.DataProvider, error) }
Abstract2Provider add `base.DataProvider` factory to provider. this means that provider can do abstract2 data provider
type Abstract2Sinker ¶
type Abstract2Sinker interface { Provider Target(...abstract.SinkOption) (base.EventTarget, error) }
Abstract2Sinker add abstract2 writer factory to provider
type ActivateCallbacks ¶
type ActivateCallbacks struct { Cleanup TablesOperationFunc Upload TablesOperationFunc CheckIncludes TablesOperationFunc Rollbacks *util.Rollbacks }
type Activator ¶
type Activator interface { Provider Activate(ctx context.Context, task *server.TransferOperation, table abstract.TableMap, callbacks ActivateCallbacks) error }
Activator enable custom functionality on transfer `Activate` task.
type AsyncSinker ¶
type AsyncSinker interface { Provider AsyncSink(middleware abstract.Middleware) (abstract.AsyncSink, error) }
AsyncSinker add ability to setup async-sink instead of sync-sink for provider
type Cleanuper ¶
type Cleanuper interface { Provider Cleanup(ctx context.Context, task *server.TransferOperation) error }
Cleanuper enable custom functionality on transfer `Activate`/`Upload`/`Reupload` tasks on `Cleanup` stage.
type Deactivator ¶
type Deactivator interface { Provider Deactivate(ctx context.Context, task *server.TransferOperation) error }
Deactivator enable custom functionality on transfer `Deactivate` task.
type Provider ¶
type Provider interface {
Type() abstract.ProviderType
}
Provider is a bare minimal implementation of provider that can do anything except existing.
type ProviderFactory ¶
type ProviderFactory func(lgr log.Logger, registry metrics.Registry, cp coordinator.Coordinator, transfer *server.Transfer) Provider
type Replication ¶
Replication add to provider `abstract.Source` factory to provider. this means that provider can do data replication
type Sampleable ¶
type Sampleable interface { Provider SourceSampleableStorage() (abstract.SampleableStorage, []abstract.TableDescription, error) DestinationSampleableStorage() (abstract.SampleableStorage, error) }
Sampleable add ability to run `Checksum` to provider.
type Snapshot ¶
Snapshot add to provider `abstract.Storage` factory to provider. this means that provider can read historycal snapshots of data
type SnapshotSinker ¶
type SnapshotSinker interface { Provider SnapshotSink(config middlewares.Config) (abstract.Sinker, error) }
SnapshotSinker optional separate writer for snapshots. Will always called for snapshots with all control events
type TMPCleaner ¶
type TMPCleaner interface { Provider TMPCleaner(ctx context.Context, task *server.TransferOperation) (Cleaner, error) }
TMPCleaner enable custom functionality on transfer `TMP Policy` inside `Cleanup` stage of `Activate` task.
type TablesOperationFunc ¶
type Tester ¶
type Tester interface { Provider TestChecks() []abstract.CheckType // list of provider specific checks Test(ctx context.Context) *abstract.TestResult }
Tester check that it's possible to execute provider with provided transfer params. Will return structured test result for that specific provider.
Directories ¶
Path | Synopsis |
---|---|
Package ch cluster - it's like stand-alone cluster with multimaster []*SinkServer - masters (AltHosts).
|
Package ch cluster - it's like stand-alone cluster with multimaster []*SinkServer - masters (AltHosts). |
httpclient
Code generated by MockGen.
|
Code generated by MockGen. |
Package kafka is a generated GoMock package.
|
Package kafka is a generated GoMock package. |
sink
Used only in sorted_table
|
Used only in sorted_table |