Class: LogStash::Api::Service
- Inherits:
-
Object
- Object
- LogStash::Api::Service
show all
- Includes:
- Util::Loggable
- Defined in:
- lib/logstash/api/service.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
included, #logger, #slow_logger
Constructor Details
#initialize(agent) ⇒ Service
Returns a new instance of Service.
12
13
14
15
|
# File 'lib/logstash/api/service.rb', line 12
def initialize(agent)
@agent = agent
logger.debug("[api-service] start") if logger.debug?
end
|
Instance Attribute Details
#agent ⇒ Object
Returns the value of attribute agent.
10
11
12
|
# File 'lib/logstash/api/service.rb', line 10
def agent
@agent
end
|
Instance Method Details
29
30
31
|
# File 'lib/logstash/api/service.rb', line 29
def (path, *keys)
snapshot.metric_store.(path, *keys)
end
|
#get_shallow(*path) ⇒ Object
25
26
27
|
# File 'lib/logstash/api/service.rb', line 25
def get_shallow(*path)
snapshot.metric_store.get_shallow(*path)
end
|
#snapshot ⇒ Object
21
22
23
|
# File 'lib/logstash/api/service.rb', line 21
def snapshot
agent.metric.collector.snapshot_metric
end
|
#started? ⇒ Boolean
17
18
19
|
# File 'lib/logstash/api/service.rb', line 17
def started?
true
end
|