Documentation
¶
Index ¶
- Constants
- type Local
- func (s *Local) LocalKill(splitName string, defaultTreatment string, changeNumber int64)
- func (s *Local) StartPeriodicDataRecording()
- func (s *Local) StartPeriodicFetching()
- func (s *Local) StopPeriodicDataRecording()
- func (s *Local) StopPeriodicFetching()
- func (s *Local) SyncAll(requestNoCache bool) error
- func (s *Local) SynchronizeSegment(name string, till *int64, _ bool) error
- func (s *Local) SynchronizeSplits(till *int64, requestNoCache bool) error
- type Manager
- type ManagerImpl
- type SplitTasks
- type Synchronizer
- type SynchronizerImpl
- func (s *SynchronizerImpl) LocalKill(splitName string, defaultTreatment string, changeNumber int64)
- func (s *SynchronizerImpl) StartPeriodicDataRecording()
- func (s *SynchronizerImpl) StartPeriodicFetching()
- func (s *SynchronizerImpl) StopPeriodicDataRecording()
- func (s *SynchronizerImpl) StopPeriodicFetching()
- func (s *SynchronizerImpl) SyncAll(requestNoCache bool) error
- func (s *SynchronizerImpl) SynchronizeSegment(name string, till *int64, requstNoCache bool) error
- func (s *SynchronizerImpl) SynchronizeSplits(till *int64, requstNoCache bool) error
- type Workers
Constants ¶
const ( // Ready represents ready Ready = iota // StreamingReady ready StreamingReady // Error represents some error in SSE streaming Error )
const ( Streaming = iota Polling )
Operation mode constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local implements Local Synchronizer
func (*Local) StartPeriodicDataRecording ¶
func (s *Local) StartPeriodicDataRecording()
StartPeriodicDataRecording starts periodic recorders tasks
func (*Local) StartPeriodicFetching ¶
func (s *Local) StartPeriodicFetching()
StartPeriodicFetching starts periodic fetchers tasks
func (*Local) StopPeriodicDataRecording ¶
func (s *Local) StopPeriodicDataRecording()
StopPeriodicDataRecording stops periodic recorders tasks
func (*Local) StopPeriodicFetching ¶
func (s *Local) StopPeriodicFetching()
StopPeriodicFetching stops periodic fetchers tasks
func (*Local) SynchronizeSegment ¶
SynchronizeSegment syncs segment
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
ManagerImpl struct
func NewSynchronizerManager ¶
func NewSynchronizerManager( synchronizer Synchronizer, logger logging.LoggerInterface, config conf.AdvancedConfig, authClient service.AuthClient, splitStorage storage.SplitStorage, managerStatus chan int, runtimeTelemetry storage.TelemetryRuntimeProducer, metadata dtos.Metadata, clientKey *string, hcMonitor application.MonitorInterface, ) (*ManagerImpl, error)
NewSynchronizerManager creates new sync manager
func (*ManagerImpl) IsRunning ¶
func (s *ManagerImpl) IsRunning() bool
IsRunning returns true if is in Streaming or Polling
func (*ManagerImpl) Start ¶
func (s *ManagerImpl) Start()
Start starts synchronization through Split
type SplitTasks ¶
type SplitTasks struct { SplitSyncTask *asynctask.AsyncTask SegmentSyncTask *asynctask.AsyncTask TelemetrySyncTask tasks.Task ImpressionSyncTask tasks.Task EventSyncTask tasks.Task ImpressionsCountSyncTask tasks.Task }
SplitTasks struct for tasks
type Synchronizer ¶
type Synchronizer interface { SyncAll(requestNoCache bool) error SynchronizeSplits(till *int64, requestNoCache bool) error LocalKill(splitName string, defaultTreatment string, changeNumber int64) SynchronizeSegment(segmentName string, till *int64, requestNoCache bool) error StartPeriodicFetching() StopPeriodicFetching() StartPeriodicDataRecording() StopPeriodicDataRecording() }
Synchronizer interface for syncing data to and from splits servers
func NewLocal ¶
func NewLocal(period int, splitAPI *api.SplitAPI, splitStorage storage.SplitStorage, logger logging.LoggerInterface, runtimeTelemetry storage.TelemetryRuntimeProducer, hcMonitor application.MonitorInterface) Synchronizer
NewLocal creates new Local
func NewSynchronizer ¶
func NewSynchronizer( confAdvanced conf.AdvancedConfig, splitTasks SplitTasks, workers Workers, logger logging.LoggerInterface, inMememoryFullQueue chan string, hcMonitor application.MonitorInterface, ) Synchronizer
NewSynchronizer creates new SynchronizerImpl
type SynchronizerImpl ¶
type SynchronizerImpl struct {
// contains filtered or unexported fields
}
SynchronizerImpl implements Synchronizer
func (*SynchronizerImpl) LocalKill ¶
func (s *SynchronizerImpl) LocalKill(splitName string, defaultTreatment string, changeNumber int64)
LocalKill locally kills a split
func (*SynchronizerImpl) StartPeriodicDataRecording ¶
func (s *SynchronizerImpl) StartPeriodicDataRecording()
StartPeriodicDataRecording starts periodic recorders tasks
func (*SynchronizerImpl) StartPeriodicFetching ¶
func (s *SynchronizerImpl) StartPeriodicFetching()
StartPeriodicFetching starts periodic fetchers tasks
func (*SynchronizerImpl) StopPeriodicDataRecording ¶
func (s *SynchronizerImpl) StopPeriodicDataRecording()
StopPeriodicDataRecording stops periodic recorders tasks
func (*SynchronizerImpl) StopPeriodicFetching ¶
func (s *SynchronizerImpl) StopPeriodicFetching()
StopPeriodicFetching stops periodic fetchers tasks
func (*SynchronizerImpl) SyncAll ¶
func (s *SynchronizerImpl) SyncAll(requestNoCache bool) error
SyncAll syncs splits and segments
func (*SynchronizerImpl) SynchronizeSegment ¶
func (s *SynchronizerImpl) SynchronizeSegment(name string, till *int64, requstNoCache bool) error
SynchronizeSegment syncs segment
func (*SynchronizerImpl) SynchronizeSplits ¶
func (s *SynchronizerImpl) SynchronizeSplits(till *int64, requstNoCache bool) error
SynchronizeSplits syncs splits
type Workers ¶
type Workers struct { SplitFetcher split.Updater SegmentFetcher segment.Updater TelemetryRecorder telemetry.TelemetrySynchronizer ImpressionRecorder impression.ImpressionRecorder EventRecorder event.EventRecorder ImpressionsCountRecorder impressionscount.ImpressionsCountRecorder }
Workers struct for workers