Class: LogStash::Api::Commands::Base
- Inherits:
-
Object
- Object
- LogStash::Api::Commands::Base
show all
- Defined in:
- lib/logstash/api/commands/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(service = LogStash::Api::Service.instance) ⇒ Base
9
10
11
|
# File 'lib/logstash/api/commands/base.rb', line 9
def initialize(service = LogStash::Api::Service.instance)
@service = service
end
|
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
7
8
9
|
# File 'lib/logstash/api/commands/base.rb', line 7
def service
@service
end
|
Instance Method Details
21
22
23
|
# File 'lib/logstash/api/commands/base.rb', line 21
def (path, *keys)
service.(path, *keys)
end
|
#started_at ⇒ Object
17
18
19
|
# File 'lib/logstash/api/commands/base.rb', line 17
def started_at
(LogStash::Agent::STARTED_AT.to_f * 1000.0).to_i
end
|
#uptime ⇒ Object
13
14
15
|
# File 'lib/logstash/api/commands/base.rb', line 13
def uptime
service.agent.uptime
end
|