Documentation
¶
Index ¶
- func StartSyncer(syncers ...DataSyncInterface) error
- func StartSyncerOnTime(syncers ...DataSyncInterface) error
- func SyncOnce(s DataSyncInterface) error
- type DataSyncInterface
- type DummySyncer
- func (s *DummySyncer) InitData() error
- func (s *DummySyncer) InitialPos() (int64, int64, int64)
- func (s *DummySyncer) Interval() error
- func (s *DummySyncer) Name() string
- func (s *DummySyncer) NextPos(start, end, pos int64) (int64, int64, int64)
- func (s *DummySyncer) QueryCount(start, end time.Time) (int64, error)
- func (s *DummySyncer) QueryData(offset, limit int, start, end time.Time) (interface{}, int64, error)
- func (s *DummySyncer) SetPosStore(store store.SyncerPosInterface)
- func (s *DummySyncer) Sink(interface{}) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartSyncer ¶
func StartSyncer(syncers ...DataSyncInterface) error
func StartSyncerOnTime ¶
func StartSyncerOnTime(syncers ...DataSyncInterface) error
func SyncOnce ¶
func SyncOnce(s DataSyncInterface) error
SyncOnce to immediately execute the synchronization logic once
Types ¶
type DataSyncInterface ¶
type DataSyncInterface interface { store.SyncerPosInterface // Name define the syncer name Name() string // SetPosStore set position store SetPosStore(store.SyncerPosInterface) // QueryCount function for total data count retrieval QueryCount(start, end time.Time) (int64, error) // QueryData function for data retrieval QueryData(offset, limit int, start, end time.Time) (interface{}, int64, error) // Sink function for data synchronization logic Sink(data interface{}) error // InitData function for initialization logic before data synchronization logic InitData() error // InitialPos for the position during the initial synchronization InitialPos() (int64, int64, int64) // NextPos for the position of the next data synchronization NextPos(start, end, pos int64) (int64, int64, int64) // Interval for the synchronization interval Interval() error }
type DummySyncer ¶
type DummySyncer struct { SyncerName string store.SyncerPosInterface }
func (*DummySyncer) InitData ¶
func (s *DummySyncer) InitData() error
func (*DummySyncer) InitialPos ¶
func (s *DummySyncer) InitialPos() (int64, int64, int64)
func (*DummySyncer) Interval ¶
func (s *DummySyncer) Interval() error
func (*DummySyncer) Name ¶
func (s *DummySyncer) Name() string
func (*DummySyncer) NextPos ¶
func (s *DummySyncer) NextPos(start, end, pos int64) (int64, int64, int64)
func (*DummySyncer) QueryCount ¶
func (s *DummySyncer) QueryCount(start, end time.Time) (int64, error)
func (*DummySyncer) SetPosStore ¶
func (s *DummySyncer) SetPosStore(store store.SyncerPosInterface)
func (*DummySyncer) Sink ¶
func (s *DummySyncer) Sink(interface{}) error
Click to show internal directories.
Click to hide internal directories.