Class: Onlyoffice::DocsIntegrationSdk::DocumentServer::Client::HealthcheckService

Inherits:
Service
  • Object
show all
Includes:
HealthcheckServing
Defined in:
lib/onlyoffice/docs_integration_sdk/document_server/client/healthcheck.rb

Overview

HealthcheckService is an implementation of the HealthcheckServing interface.

Since:

  • 0.1.0

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Onlyoffice::DocsIntegrationSdk::DocumentServer::Client::Service

Instance Method Details

#do ⇒ Response

do makes a healthcheck request to the Document Server.

Returns:

Since:

  • 0.1.0



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/healthcheck.rb', line 81

def do
  c, res = @client.get("healthcheck")
  if res.error
    return res
  end

  if !c.is_a?(TrueClass)
    res = Response.new(
      request: res.request,
      response: res.response,
      error: Error::Failed,
    )
  end

  res
end