Sha256: c71ad0560f52a1700dd4902d389186279a7770a5af0c254ac4dd7062fe7ca91a
Contents?: true
Size: 1.71 KB
Versions: 35
Compression:
Stored size: 1.71 KB
Contents
module KineticSdk class Task # Start the task engine # # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties def start_engine(headers=default_headers) body = { "action" => "start" } post("#{@api_url}/engine", body, headers) end # Stop the task engine # # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties def stop_engine(headers=default_headers) body = { "action" => "stop" } post("#{@api_url}/engine", body, headers) end # Get the engine info # # @param params [Hash] Query parameters that are added to the URL, such as +include+ # @param headers [Hash] hash of headers to send, default is basic authentication # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties def engine_info(params={}, headers=header_basic_auth) get("#{@api_url}/engine", params, headers) end # Get the engine status # # @param headers [Hash] hash of headers to send, default is basic authentication # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties def engine_status(headers=header_basic_auth) response = @logger.info({}, headers) data = response.content data.nil? ? "Unknown" : data['status'] end end end
Version data entries
35 entries across 35 versions & 1 rubygems