Documentation
¶
Index ¶
- Constants
- Variables
- func NewStats() *stats.Stats
- type BufferObserverAdapter
- type GLoader
- func (g *GLoader) Dest(name, dsn string) error
- func (g *GLoader) Exclude(dataCollections ...string) *GLoader
- func (g *GLoader) Filter(dataCollection, key string, condition driver.Condition, value string) *GLoader
- func (g *GLoader) FilterAll(key string, condition driver.Condition, value string) *GLoader
- func (g *GLoader) GetDestDetails(ctx context.Context) (driver.DatabaseDetail, error)
- func (g *GLoader) GetSrcDetails(ctx context.Context) (driver.DatabaseDetail, error)
- func (g *GLoader) Include(dataCollections ...string) *GLoader
- func (g *GLoader) OrderBy(dataCollection, key string, direction driver.Direction) *GLoader
- func (g *GLoader) OrderByAll(key string, direction driver.Direction) *GLoader
- func (g *GLoader) SetEndOffset(dataCollection string, offset uint64) *GLoader
- func (g *GLoader) SetRowsPerBatch(rowsPerBatch uint64) *GLoader
- func (g *GLoader) SetStartOffset(dataCollection string, offset uint64) *GLoader
- func (g *GLoader) SetWorkers(workers uint) *GLoader
- func (g *GLoader) Src(name, dsn string) error
- func (g *GLoader) Start() error
- func (g *GLoader) StartWithContext(ctx context.Context) error
- func (g *GLoader) Stats() *stats.Stats
- func (g *GLoader) Stop()
- type MetricKey
- type Reader
- type Writer
Constants ¶
View Source
const ( DefaultRowsPerBatch = 100 DefaultWorkers = 3 )
Variables ¶
View Source
var ( ErrBufferNotSet = errors.New("buffer not set") ErrConnectionPoolNotSet = errors.New("connection pool not set") ErrDataMapNotSet = errors.New("data map not set") ErrEndOffsetLessThanStartOffset = errors.New("end offset less than start offset") ErrEndOffsetRequired = errors.New("end offset required") ErrSrcConnectionIsRequired = errors.New("source connection is required") ErrDestConnectionIsRequired = errors.New("destination connection is required") )
View Source
var ErrCCCauseStopFuncCalled = errors.New("stop func called")
Functions ¶
Types ¶
type BufferObserverAdapter ¶
type BufferObserverAdapter struct {
// contains filtered or unexported fields
}
func NewBufferObserverAdapter ¶
func NewBufferObserverAdapter(s *stats.Stats, dcName string) *BufferObserverAdapter
func (*BufferObserverAdapter) LengthChanged ¶
func (b *BufferObserverAdapter) LengthChanged(l uint64)
func (*BufferObserverAdapter) Read ¶
func (b *BufferObserverAdapter) Read(n int)
func (*BufferObserverAdapter) SizeChanged ¶
func (b *BufferObserverAdapter) SizeChanged(size uint64)
func (*BufferObserverAdapter) Write ¶
func (b *BufferObserverAdapter) Write(n int)
type GLoader ¶
type GLoader struct {
// contains filtered or unexported fields
}
func NewGLoader ¶
func NewGLoader() *GLoader
func (*GLoader) GetDestDetails ¶
func (*GLoader) GetSrcDetails ¶
func (*GLoader) OrderByAll ¶
func (*GLoader) SetEndOffset ¶
func (*GLoader) SetRowsPerBatch ¶
func (*GLoader) SetStartOffset ¶
func (*GLoader) SetWorkers ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) SetEndOffset ¶
func (*Reader) SetRowsPerBatch ¶
func (*Reader) SetStartOffset ¶
func (*Reader) SetWorkers ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) SetRowsPerBatch ¶
func (*Writer) SetWorkers ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gloader
command
|
|
|
Package data contains the all data related types and functionalities.
|
Package data contains the all data related types and functionalities. |
|
types
Package types is a package that contains some generic data types.
|
Package types is a package that contains some generic data types. |
|
pkg
|
|
|
stats
Package stats provide a simple real-time metric registry for monitoring and observability.
|
Package stats provide a simple real-time metric registry for monitoring and observability. |
Click to show internal directories.
Click to hide internal directories.