// OperateRelay operates relay unit.
OperateRelay operates relay unit.
// OperateRelay operates relay unit .
func (w *SourceWorker) operateRelay(ctx context.Context, op pb.RelayOp) error {
	if w.closed.Load() {
		return terror.ErrWorkerAlreadyClosed.Generate()
	}
	if w.relayEnabled.Load() {
		return w.relayHolder.Operate(ctx, op)
	}
	w.l.Warn("enable-relay is false, ignore operate relay")
	return nil
}
func ( w * SourceWorker ) operateRelay ( ctx context . Context , op pb . RelayOp ) error { if w . closed . Load ( ) { return terror . ErrWorkerAlreadyClosed . Generate ( ) } if w . relayEnabled . Load ( ) { return w . relayHolder . Operate ( ctx , op ) } w . l . Warn ( " " ) return nil }
OperateRelay operates relay unit.
OperateRelay operates relay unit .
// TODO: lock the worker?