public void PushHealthCheck(PushHealthCheckModel pushHealthCheckModel)
        {
            pushHealthCheckModel.ServiceId   = serviceId;
            pushHealthCheckModel.ServiceName = _serviceOptions.CurrentValue.Name;
            var monitorTask = _monitorProvider.AddMonitorPulse(pushHealthCheckModel);

            monitorTask.Wait();
        }
        public void PushHealthCheck(HealthCheckRequest healthCheckRequest)
        {
            healthCheckRequest.ServiceId   = serviceId;
            healthCheckRequest.ServiceName = _selfOptions.ServerName;
            var monitorTask = _monitorProvider.AddMonitorPulse(healthCheckRequest);

            monitorTask.Wait();
        }
        public override async Task <HealthCheckResponse> Push(IAsyncStreamReader <HealthCheckRequest> requestStream, ServerCallContext context)
        {
            while (await requestStream.MoveNext())
            {
                await _monitorProvider.AddMonitorPulse(requestStream.Current);
            }

            return(new HealthCheckResponse {
                Succeed = true
            });
        }
        public async Task <IActionResult> AddHeartBeat([FromBody] PushHealthCheckModel pushHealthCheckModel)
        {
            await _monitorProvider.AddMonitorPulse(pushHealthCheckModel);

            return(Ok());
        }