Skip to content

Latest commit

 

History

History
212 lines (128 loc) · 3.18 KB

DefaultApi.md

File metadata and controls

212 lines (128 loc) · 3.18 KB

Dkron::DefaultApi

All URIs are relative to http://localhost:8080/v1

Method HTTP request Description
busy GET /busy
get_is_leader GET /isleader
get_leader GET /leader
leave POST /leave
status GET /

busy

Array<Execution> busy

Returns the running executions.

Example

# load the gem
require 'dkron-ruby'

api_instance = Dkron::DefaultApi.new

begin
  result = api_instance.busy
  p result
rescue Dkron::ApiError => e
  puts "Exception when calling DefaultApi->busy: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<Execution>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_is_leader

get_is_leader

Check if node is a leader or follower.

Example

# load the gem
require 'dkron-ruby'

api_instance = Dkron::DefaultApi.new

begin
  api_instance.get_is_leader
rescue Dkron::ApiError => e
  puts "Exception when calling DefaultApi->get_is_leader: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_leader

Member get_leader

List leader of cluster.

Example

# load the gem
require 'dkron-ruby'

api_instance = Dkron::DefaultApi.new

begin
  result = api_instance.get_leader
  p result
rescue Dkron::ApiError => e
  puts "Exception when calling DefaultApi->get_leader: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Member

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

leave

Array<Member> leave

Force the node to leave the cluster.

Example

# load the gem
require 'dkron-ruby'

api_instance = Dkron::DefaultApi.new

begin
  result = api_instance.leave
  p result
rescue Dkron::ApiError => e
  puts "Exception when calling DefaultApi->leave: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<Member>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

status

Status status

Gets Status object.

Example

# load the gem
require 'dkron-ruby'

api_instance = Dkron::DefaultApi.new

begin
  result = api_instance.status
  p result
rescue Dkron::ApiError => e
  puts "Exception when calling DefaultApi->status: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Status

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json