131
132
// Start starts the processor
134
>
if !atomic.CompareAndSwapInt32(
135
>
&r.status,
136
>
common.DaemonStatusInitialized,
137
>
common.DaemonStatusStarted,
138
>
) {
139
return
140
}
141
142
>
go WrapEventLoop(context.Background(), r.sendEventLoop, r.Stop, r.logger, r.MetricsHandler, r.clientShardKey, r.serverShardKey, r.Config)
stream_receiver.go
143
>
go WrapEventLoop(context.Background(), r.recvEventLoop, r.Stop, r.logger, r.MetricsHandler, r.clientShardKey, r.serverShardKey, r.Config)
144
>
go livenessMonitor(
145
>
r.recvSignalChan,
146
>
r.Config.ReplicationStreamSendEmptyTaskDuration,
147
>
r.Config.ReplicationStreamReceiverLivenessMultiplier,
148
>
r.shutdownChan,
149
>
r.Stop,
150
>
r.logger,
151
>
)
152
>
r.logger.Info("StreamReceiver started.")
153
}
154