Class: Gitlab::Elasticsearch::Logs::Pods

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/elasticsearch/logs/pods.rb

Constant Summary collapse

PODS_LIMIT =

How many items to fetch in a query

500
CONTAINERS_LIMIT =
500

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Pods

Returns a new instance of Pods.


11
12
13
# File 'lib/gitlab/elasticsearch/logs/pods.rb', line 11

def initialize(client)
  @client = client
end

Instance Method Details

#pods(namespace) ⇒ Object


15
16
17
18
19
20
# File 'lib/gitlab/elasticsearch/logs/pods.rb', line 15

def pods(namespace)
  body = build_body(namespace)
  response = @client.search body: body

  format_response(response)
end