Module: Prometheus::ApiClient

Defined in:
lib/prometheus/api_client.rb,
lib/prometheus/api_client/client.rb,
lib/prometheus/api_client/version.rb

Overview

Client is a ruby implementation for a Prometheus compatible api_client.

Defined Under Namespace

Classes: Client

Constant Summary collapse

VERSION =
'0.6.1'

Class Method Summary collapse

Class Method Details

.client(options = {}) ⇒ Object

Create a Prometheus API client:

A default client is created if options is omitted.

Parameters:

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

Options Hash (options):

  • :url (String)

    Server base URL.

  • :credentials (Hash)

    Authentication credentials.

  • :options (Hash)

    Options used to define connection.

  • :headers (Hash)

    Unencoded HTTP header key/value pairs.

  • :request (Hash)

    Request options.

  • :ssl (Hash)

    SSL options.

  • :proxy (String)

    Proxy url.



22
23
24
# File 'lib/prometheus/api_client.rb', line 22

def self.client(options = {})
  Client.new(options)
end