Example #1
0
        public IActionResult GetServiceStatusSingle(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(BadRequest($"'{nameof(name)}' cannot be null"));
            }

            Log.LogInformation($"{nameof(GetServiceStatusSingle)}: Resolving service status for '{name}'...");

            var result = _healthCheckState.GetServiceState(new[] { name });

            Log.LogInformation($"{nameof(GetServiceStatusSingle)}: '{name}' status is {JsonConvert.SerializeObject(result)}");

            return(Ok(result));
        }
Example #2
0
 /// <inheritdoc/>
 public IEnumerable <ServicePingResponse> GetServiceState(params string[] serviceIdentifiers) => _healthCheckState.GetServiceState(serviceIdentifiers);