Documentation
¶
Index ¶
- func DataObjectsToTableParts(objects DataObjects, filter DataObjectFilter) ([]abstract.TableDescription, error)
- func EventToString(event Event) string
- type Column
- type DataObject
- type DataObjectFilter
- type DataObjectPart
- type DataObjects
- type DataProvider
- type DefaultEventSourceProgress
- type Discoverable
- type Event
- type EventBatch
- type EventSource
- type EventSourceProgress
- type EventTarget
- type LogPosition
- type LoggedEvent
- type ProgressableEventSource
- type ReplicationProvider
- type SnapshotProvider
- type SupportsOldChangeItem
- type SupportsOldCommitTime
- type SupportsOldLSN
- type Table
- type TrackerProvider
- type Transaction
- type TransactionalEvent
- type Type
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataObjectsToTableParts ¶
func DataObjectsToTableParts(objects DataObjects, filter DataObjectFilter) ([]abstract.TableDescription, error)
func EventToString ¶
Types ¶
type DataObject ¶
type DataObjectFilter ¶
type DataObjectPart ¶
type DataObjectPart interface {
Name() string
FullName() string
// Support legacy
ToOldTableDescription() (*abstract.TableDescription, error)
// Support new snapshot
ToTablePart() (*abstract.TableDescription, error)
}
type DataObjects ¶
type DataProvider ¶
type DefaultEventSourceProgress ¶
type DefaultEventSourceProgress struct {
// contains filtered or unexported fields
}
func NewDefaultEventSourceProgress ¶
func NewDefaultEventSourceProgress(done bool, current uint64, total uint64) *DefaultEventSourceProgress
func (*DefaultEventSourceProgress) Current ¶
func (progress *DefaultEventSourceProgress) Current() uint64
func (*DefaultEventSourceProgress) Done ¶
func (progress *DefaultEventSourceProgress) Done() bool
func (*DefaultEventSourceProgress) Total ¶
func (progress *DefaultEventSourceProgress) Total() uint64
type Discoverable ¶
type Discoverable interface {
Discover() (*model.DataObjects, error)
}
type EventBatch ¶
func NewBatchFromBatches ¶
func NewBatchFromBatches(batches []EventBatch) EventBatch
func NewEventBatch ¶
func NewEventBatch(events []Event) EventBatch
func NewSingleEventBatch ¶
func NewSingleEventBatch(event Event) EventBatch
type EventSource ¶
type EventSource interface {
Running() bool
Start(ctx context.Context, target EventTarget) error
Stop() error
}
For any event source, replication, snapshot, etc
type EventSourceProgress ¶
type EventTarget ¶
type EventTarget interface {
io.Closer
AsyncPush(input EventBatch) chan error
}
abstract.AsyncSink for abstract2
type LogPosition ¶
type LogPosition interface {
fmt.Stringer
Equals(otherPosition LogPosition) bool
Compare(otherPosition LogPosition) (int, error)
}
type LoggedEvent ¶
type LoggedEvent interface {
Event
Position() LogPosition
}
type ProgressableEventSource ¶
type ProgressableEventSource interface {
EventSource
Progress() (EventSourceProgress, error)
}
Reporting of progress for not endless event sources Like snapshots, schema creation, etc
type ReplicationProvider ¶
type ReplicationProvider interface {
DataProvider
CreateReplicationSource() (EventSource, error)
}
type SnapshotProvider ¶
type SnapshotProvider interface {
DataProvider
BeginSnapshot() error
DataObjects(filter DataObjectFilter) (DataObjects, error)
TableSchema(part DataObjectPart) (*abstract.TableSchema, error)
CreateSnapshotSource(part DataObjectPart) (ProgressableEventSource, error)
EndSnapshot() error
// Support legacy
ResolveOldTableDescriptionToDataPart(tableDesc abstract.TableDescription) (DataObjectPart, error)
// Support new snapshot
DataObjectsToTableParts(filter DataObjectFilter) ([]abstract.TableDescription, error)
TablePartToDataObjectPart(tableDescription *abstract.TableDescription) (DataObjectPart, error)
}
type SupportsOldChangeItem ¶
type SupportsOldChangeItem interface {
Event
ToOldChangeItem() (*abstract.ChangeItem, error)
}
Support legacy
type SupportsOldCommitTime ¶
type SupportsOldCommitTime interface {
LogPosition
ToOldCommitTime() (uint64, error) // To ChangeItem.CommitTime
}
Support legacy
type SupportsOldLSN ¶
type SupportsOldLSN interface {
LogPosition
ToOldLSN() (uint64, error) // To ChangeItem.LSN
}
Support legacy
type TrackerProvider ¶
type TrackerProvider interface {
DataProvider
ResetTracker(typ abstract.TransferType) error
}
type Transaction ¶
type Transaction interface {
fmt.Stringer
BeginPosition() LogPosition
EndPosition() LogPosition
Equals(otherTransaction Transaction) bool
}
type TransactionalEvent ¶
type TransactionalEvent interface {
LoggedEvent
Transaction() Transaction
}
Click to show internal directories.
Click to hide internal directories.