public static CheckHealthResponse Unmarshall(UnmarshallerContext _ctx) { CheckHealthResponse checkHealthResponse = new CheckHealthResponse(); checkHealthResponse.HttpResponse = _ctx.HttpResponse; checkHealthResponse.RequestId = _ctx.StringValue("CheckHealth.RequestId"); checkHealthResponse.Status = _ctx.StringValue("CheckHealth.Status"); return(checkHealthResponse); }
public override Task <CheckHealthResponse> CheckHealth(CheckHealthRequest request, ServerCallContext context) { log.LogDebug("Check Health Request {0}", request); var connection = _connections.Get(request.PluginContext.DataSourceInstanceSettings); CheckHealthResponse checkHealthResponse = new CheckHealthResponse { Status = connection.Session.Connected ? CheckHealthResponse.Types.HealthStatus.Ok : CheckHealthResponse.Types.HealthStatus.Error, Message = connection.Session.Connected ? "Connected Successfully" : "Connection Failed", }; return(Task.FromResult(checkHealthResponse)); }