Documentation ¶
Overview ¶
Package heavyclient contains heavy replication client code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JetClient ¶
type JetClient struct { Bus core.MessageBus PulseStorage core.PulseStorage // contains filtered or unexported fields }
JetClient heavy replication client. Replicates records for one jet.
func NewJetClient ¶
NewJetClient heavy replication client constructor.
First argument defines what jet it serve.
type Options ¶
type Options struct { SyncMessageLimit int PulsesDeltaLimit int BackoffConf configuration.Backoff }
Options contains heavy client configuration params.
type Pool ¶
type Pool struct { Bus core.MessageBus PulseStorage core.PulseStorage ClientDefaults Options sync.Mutex // contains filtered or unexported fields }
Pool manages state of heavy sync clients (one client per jet id).
func (*Pool) AddPulsesToSyncClient ¶
func (scp *Pool) AddPulsesToSyncClient( ctx context.Context, jetID core.RecordID, shouldrun bool, pns ...core.PulseNumber, ) *JetClient
AddPulsesToSyncClient add pulse numbers to the end of jet's heavy client queue.
Bool flag 'shouldrun' controls should heavy client be started (if not already) or not.
Click to show internal directories.
Click to hide internal directories.