Documentation
¶
Index ¶
- Variables
- func RetryOnBackoff(attempts int, sleep time.Duration, f func() error) (err error)
- type AbstractDriver
- func (a *AbstractDriver) Backfill(ctx context.Context, backfilledStreams chan string, ...) error
- func (a *AbstractDriver) Discover(ctx context.Context) ([]*types.Stream, error)
- func (a *AbstractDriver) GetConfigRef() Config
- func (a *AbstractDriver) Incremental(ctx context.Context, pool *destination.WriterPool, ...) error
- func (a *AbstractDriver) Read(ctx context.Context, pool *destination.WriterPool, ...) error
- func (a *AbstractDriver) RunChangeStream(ctx context.Context, pool *destination.WriterPool, ...) error
- func (a *AbstractDriver) Setup(ctx context.Context) error
- func (a *AbstractDriver) SetupState(state *types.State)
- func (a *AbstractDriver) Spec() any
- func (a *AbstractDriver) TestDiscover(t *testing.T, conn interface{}, execQuery ExecuteQuery)
- func (a *AbstractDriver) TestRead(t *testing.T, conn interface{}, execQuery ExecuteQuery)
- func (a *AbstractDriver) TestSetup(t *testing.T)
- func (a *AbstractDriver) Type() string
- type BackfillMsgFn
- type CDCChange
- type CDCMsgFn
- type Config
- type DriverInterface
- type ExecuteQuery
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type AbstractDriver ¶
type AbstractDriver struct {
GlobalConnGroup *utils.CxGroup
GlobalCtxGroup *utils.CxGroup
// contains filtered or unexported fields
}
func NewAbstractDriver ¶
func NewAbstractDriver(ctx context.Context, driver DriverInterface) *AbstractDriver
func (*AbstractDriver) Backfill ¶
func (a *AbstractDriver) Backfill(ctx context.Context, backfilledStreams chan string, pool *destination.WriterPool, stream types.StreamInterface) error
func (*AbstractDriver) GetConfigRef ¶
func (a *AbstractDriver) GetConfigRef() Config
func (*AbstractDriver) Incremental ¶ added in v0.1.6
func (a *AbstractDriver) Incremental(ctx context.Context, pool *destination.WriterPool, streams ...types.StreamInterface) error
func (*AbstractDriver) Read ¶
func (a *AbstractDriver) Read(ctx context.Context, pool *destination.WriterPool, backfillStreams, cdcStreams, incrementalStreams []types.StreamInterface) error
Read handles different sync modes for data retrieval
func (*AbstractDriver) RunChangeStream ¶
func (a *AbstractDriver) RunChangeStream(ctx context.Context, pool *destination.WriterPool, streams ...types.StreamInterface) error
func (*AbstractDriver) SetupState ¶
func (a *AbstractDriver) SetupState(state *types.State)
func (*AbstractDriver) Spec ¶
func (a *AbstractDriver) Spec() any
func (*AbstractDriver) TestDiscover ¶
func (a *AbstractDriver) TestDiscover(t *testing.T, conn interface{}, execQuery ExecuteQuery)
TestDiscover tests the discovery of tables
func (*AbstractDriver) TestRead ¶
func (a *AbstractDriver) TestRead(t *testing.T, conn interface{}, execQuery ExecuteQuery)
TestRead tests full refresh and CDC read operations
func (*AbstractDriver) TestSetup ¶
func (a *AbstractDriver) TestSetup(t *testing.T)
TestSetup tests the driver setup and connection check
func (*AbstractDriver) Type ¶ added in v0.1.2
func (a *AbstractDriver) Type() string
type BackfillMsgFn ¶
type DriverInterface ¶
type DriverInterface interface {
GetConfigRef() Config
Spec() any
Type() string
// specific to test & setup
Setup(ctx context.Context) error
SetupState(state *types.State)
// sync artifacts
MaxConnections() int
MaxRetries() int
// specific to discover
GetStreamNames(ctx context.Context) ([]string, error)
ProduceSchema(ctx context.Context, stream string) (*types.Stream, error)
// specific to backfill
GetOrSplitChunks(ctx context.Context, pool *destination.WriterPool, stream types.StreamInterface) (*types.Set[types.Chunk], error)
ChunkIterator(ctx context.Context, stream types.StreamInterface, chunk types.Chunk, processFn BackfillMsgFn) error
//incremental specific
StreamIncrementalChanges(ctx context.Context, stream types.StreamInterface, cb BackfillMsgFn) error
// specific to cdc
CDCSupported() bool
PreCDC(ctx context.Context, streams []types.StreamInterface) error // to init state
StreamChanges(ctx context.Context, stream types.StreamInterface, processFn CDCMsgFn) error
PostCDC(ctx context.Context, stream types.StreamInterface, success bool) error // to save state
}
Click to show internal directories.
Click to hide internal directories.