Class: DockerEngineRuby::Resources::System
- Inherits:
-
Object
- Object
- DockerEngineRuby::Resources::System
- Defined in:
- lib/docker_engine_ruby/resources/system.rb
Instance Method Summary collapse
-
#data_usage(type: nil, verbose: nil, request_options: {}) ⇒ DockerEngineRuby::Models::SystemDataUsageResponse
Get data usage information.
-
#events(filters: nil, since: nil, until_: nil, request_options: {}) ⇒ DockerEngineRuby::Models::SystemEventsResponse
Monitor events.
-
#info(request_options: {}) ⇒ DockerEngineRuby::Models::Info
Get system information.
-
#initialize(client:) ⇒ System
constructor
private
A new instance of System.
-
#ping(request_options: {}) ⇒ String
Ping.
-
#version(request_options: {}) ⇒ DockerEngineRuby::Models::Version
Get version.
Constructor Details
#initialize(client:) ⇒ System
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of System.
111 112 113 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 111 def initialize(client:) @client = client end |
Instance Method Details
#data_usage(type: nil, verbose: nil, request_options: {}) ⇒ DockerEngineRuby::Models::SystemDataUsageResponse
Get data usage information
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 17 def data_usage(params = {}) parsed, = DockerEngineRuby::SystemDataUsageParams.dump_request(params) query = DockerEngineRuby::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "system/df", query: query, model: DockerEngineRuby::Models::SystemDataUsageResponse, options: ) end |
#events(filters: nil, since: nil, until_: nil, request_options: {}) ⇒ DockerEngineRuby::Models::SystemEventsResponse
Monitor events
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 41 def events(params = {}) parsed, = DockerEngineRuby::SystemEventsParams.dump_request(params) query = DockerEngineRuby::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "events", query: query.transform_keys(until_: "until"), model: DockerEngineRuby::Models::SystemEventsResponse, options: ) end |
#info(request_options: {}) ⇒ DockerEngineRuby::Models::Info
Get system information
62 63 64 65 66 67 68 69 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 62 def info(params = {}) @client.request( method: :get, path: "info", model: DockerEngineRuby::Info, options: params[:request_options] ) end |
#ping(request_options: {}) ⇒ String
Ping
80 81 82 83 84 85 86 87 88 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 80 def ping(params = {}) @client.request( method: :get, path: "_ping", headers: {"accept" => "text/plain"}, model: String, options: params[:request_options] ) end |
#version(request_options: {}) ⇒ DockerEngineRuby::Models::Version
Get version
99 100 101 102 103 104 105 106 |
# File 'lib/docker_engine_ruby/resources/system.rb', line 99 def version(params = {}) @client.request( method: :get, path: "version", model: DockerEngineRuby::Version, options: params[:request_options] ) end |