healthWriterWithHttpInfo method

Future<Response> healthWriterWithHttpInfo({
  1. String? uuidToken,
  2. String? ip,
})

Check Logbot Writer status

Checks if Logbot Writer is actually running. If the service doesn't provides a response, the reason could be either the service is not running or the device is unreachable (powered off or unreachable).

Note: This method returns the HTTP Response.

Parameters:

  • String uuidToken: Used for remote connections to device

Implementation

Future<Response> healthWriterWithHttpInfo({
  String? uuidToken,
  String? ip,
}) async {
  // ignore: prefer_const_declarations
  final path = ip == null
      ? '${LbStateManagerEnvironment.getApiEndpoint(iotUuid: uuidToken!, servicePort: LbStateManagerEnvironment.lbWriterPort)}/healthcheck'
      : '$ip:${LbStateManagerEnvironment.lbWriterPort}/healthcheck';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}