Class: Qdrant::Service

Inherits:
Base
  • Object
show all
Defined in:
lib/qdrant/service.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Qdrant::Base

Instance Method Details

#locksObject

Get lock options. If write is locked, all write operations and collection creation are forbidden



40
41
42
43
# File 'lib/qdrant/service.rb', line 40

def locks
  response = client.connection.get("locks")
  response.body
end

#metrics(anonymize: nil) ⇒ Object

Collect metrics data including app info, collections info, cluster info and statistics



16
17
18
19
20
21
22
23
# File 'lib/qdrant/service.rb', line 16

def metrics(
  anonymize: nil
)
  response = client.connection.get("metrics") do |req|
    req.params["anonymize"] = anonymize if anonymize
  end
  response.body
end

#set_lock(write:, error_message: nil) ⇒ Object

Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/qdrant/service.rb', line 26

def set_lock(
  write:,
  error_message: nil
)
  response = client.connection.post("locks") do |req|
    req.body = {
      write: write
    }
    req.body["error_message"] = error_message if error_message
  end
  response.body
end

#telemetry(anonymize: nil) ⇒ Object

Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics



6
7
8
9
10
11
12
13
# File 'lib/qdrant/service.rb', line 6

def telemetry(
  anonymize: nil
)
  response = client.connection.get("telemetry") do |req|
    req.params["anonymize"] = anonymize if anonymize
  end
  response.body
end