Class: Couchbase::DiagnosticsResult

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/diagnostics.rb

Defined Under Namespace

Classes: ServiceInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ DiagnosticsResult

Returns a new instance of DiagnosticsResult.

Yield Parameters:



82
83
84
85
# File 'lib/couchbase/diagnostics.rb', line 82

def initialize
  @services = {}
  yield self if block_given?
end

Instance Attribute Details

#idString

Returns report id.

Returns:

  • (String)

    report id



64
65
66
# File 'lib/couchbase/diagnostics.rb', line 64

def id
  @id
end

#sdkString

Returns SDK identifier.

Returns:

  • (String)

    SDK identifier



67
68
69
# File 'lib/couchbase/diagnostics.rb', line 67

def sdk
  @sdk
end

#servicesHash<Symbol, ServiceInfo>

Returns information about currently service endpoints, that known to the library at the moment.

:kv

Key/Value data service

:query

N1QL query service

:analytics

Analtyics service

:search

Full text search service

:views

Views service

:mgmt

Management service

Returns:

  • (Hash<Symbol, ServiceInfo>)

    map service types to info



79
80
81
# File 'lib/couchbase/diagnostics.rb', line 79

def services
  @services
end

Instance Method Details

#to_json(*args) ⇒ Object



91
92
93
94
95
96
97
98
# File 'lib/couchbase/diagnostics.rb', line 91

def to_json(*args)
  {
    version: @version,
    id: @id,
    sdk: @sdk,
    services: @services,
  }.to_json(*args)
end