Method: Elasticsearch::API::Watcher::Actions#start

Defined in:
lib/elasticsearch/api/actions/watcher/start.rb

#start(arguments = {}) ⇒ Object

Starts Watcher if it is not already running.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :master_timeout (Time)

    Specify timeout for connection to master

  • :headers (Hash)

    Custom HTTP headers

See Also:


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch/api/actions/watcher/start.rb', line 32

def start(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'watcher.start' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_POST
  path   = '_watcher/_start'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end