Documentation ¶
Index ¶
- Constants
- Variables
- type BatchOption
- type BatchSettings
- type Client
- type Metrics
- func (s *Metrics) Equal(other *Metrics) bool
- func (s *Metrics) TotalErrors() uint64
- func (s *Metrics) TotalErrorsAtomic() uint64
- func (s *Metrics) TotalPanics() uint64
- func (s *Metrics) TotalPanicsAtomic() uint64
- func (s *Metrics) TotalResources() uint64
- func (s *Metrics) TotalResourcesAtomic() uint64
- type Option
- func WithBatchOptions(options ...BatchOption) Option
- func WithConcurrency(concurrency int) Option
- func WithInvocationID(invocationID string) Option
- func WithLogger(logger zerolog.Logger) Option
- func WithMaxDepth(maxDepth uint64) Option
- func WithSingleNestedTableMaxConcurrency(concurrency int64) Option
- func WithSingleResourceMaxConcurrency(concurrency int64) Option
- func WithStrategy(strategy Strategy) Option
- func WithoutBatching() Option
- type OtelMeters
- type Scheduler
- type Strategies
- type Strategy
- type SyncOption
- type TableClientMetrics
- func (m *TableClientMetrics) Equal(other *TableClientMetrics) bool
- func (m *TableClientMetrics) OtelEndTime(ctx context.Context, end time.Time)
- func (m *TableClientMetrics) OtelErrorsAdd(ctx context.Context, count int64)
- func (m *TableClientMetrics) OtelPanicsAdd(ctx context.Context, count int64)
- func (m *TableClientMetrics) OtelResourcesAdd(ctx context.Context, count int64)
- func (m *TableClientMetrics) OtelStartTime(ctx context.Context, start time.Time)
Constants ¶
View Source
const ( DefaultBatchMaxRows = 50 DefaultBatchTimeout = 5 * time.Second )
View Source
const ( DefaultSingleResourceMaxConcurrency = 5 DefaultSingleNestedTableMaxConcurrency = 5 DefaultConcurrency = 50000 DefaultMaxDepth = 4 )
Variables ¶
View Source
var AllStrategies = Strategies{StrategyDFS, StrategyRoundRobin, StrategyShuffle}
View Source
var AllStrategyNames = [...]string{
StrategyDFS: "dfs",
StrategyRoundRobin: "round-robin",
StrategyShuffle: "shuffle",
}
View Source
var ErrNoTables = errors.New("no tables specified for syncing, review `tables` and `skip_tables` in your config and specify at least one table to sync")
Functions ¶
This section is empty.
Types ¶
type BatchOption ¶ added in v4.46.0
type BatchOption func(settings *BatchSettings)
func WithBatchMaxRows ¶ added in v4.46.0
func WithBatchMaxRows(rows int) BatchOption
func WithBatchTimeout ¶ added in v4.46.0
func WithBatchTimeout(timeout time.Duration) BatchOption
type BatchSettings ¶ added in v4.46.0
type Metrics ¶
type Metrics struct {
TableClient map[string]map[string]*TableClientMetrics
}
Metrics is deprecated as we move toward open telemetry for tracing and metrics
func (*Metrics) TotalErrors ¶
func (*Metrics) TotalErrorsAtomic ¶
func (*Metrics) TotalPanics ¶
func (*Metrics) TotalPanicsAtomic ¶
func (*Metrics) TotalResources ¶
func (*Metrics) TotalResourcesAtomic ¶
type Option ¶
type Option func(*Scheduler)
func WithBatchOptions ¶ added in v4.46.0
func WithBatchOptions(options ...BatchOption) Option
func WithConcurrency ¶
func WithInvocationID ¶ added in v4.49.0
func WithLogger ¶
func WithMaxDepth ¶
func WithSingleNestedTableMaxConcurrency ¶ added in v4.21.0
func WithSingleResourceMaxConcurrency ¶ added in v4.23.0
func WithStrategy ¶
func WithoutBatching ¶ added in v4.48.0
func WithoutBatching() Option
type OtelMeters ¶ added in v4.49.0
type OtelMeters struct {
// contains filtered or unexported fields
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func (*Scheduler) Sync ¶
func (s *Scheduler) Sync(ctx context.Context, client schema.ClientMeta, tables schema.Tables, res chan<- message.SyncMessage, opts ...SyncOption) error
type Strategies ¶
type Strategies []Strategy
func (Strategies) String ¶
func (s Strategies) String() string
type Strategy ¶
type Strategy int
func StrategyForName ¶
func (Strategy) JSONSchema ¶ added in v4.12.0
func (Strategy) JSONSchema() *jsonschema.Schema
func (*Strategy) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Strategy) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type SyncOption ¶
type SyncOption func(*syncClient)
func WithSyncDeterministicCQID ¶
func WithSyncDeterministicCQID(deterministicCQID bool) SyncOption
type TableClientMetrics ¶
type TableClientMetrics struct { Resources uint64 Errors uint64 Panics uint64 Duration atomic.Pointer[time.Duration] // contains filtered or unexported fields }
func (*TableClientMetrics) Equal ¶
func (m *TableClientMetrics) Equal(other *TableClientMetrics) bool
func (*TableClientMetrics) OtelEndTime ¶ added in v4.49.0
func (m *TableClientMetrics) OtelEndTime(ctx context.Context, end time.Time)
func (*TableClientMetrics) OtelErrorsAdd ¶ added in v4.49.0
func (m *TableClientMetrics) OtelErrorsAdd(ctx context.Context, count int64)
func (*TableClientMetrics) OtelPanicsAdd ¶ added in v4.49.0
func (m *TableClientMetrics) OtelPanicsAdd(ctx context.Context, count int64)
func (*TableClientMetrics) OtelResourcesAdd ¶ added in v4.49.0
func (m *TableClientMetrics) OtelResourcesAdd(ctx context.Context, count int64)
func (*TableClientMetrics) OtelStartTime ¶ added in v4.49.0
func (m *TableClientMetrics) OtelStartTime(ctx context.Context, start time.Time)
Click to show internal directories.
Click to hide internal directories.