Module: Liveness

Defined in:
lib/liveness.rb,
lib/liveness/access.rb,
lib/liveness/config.rb,
lib/liveness/status.rb,
lib/liveness/version.rb,
lib/liveness/container.rb,
lib/liveness/dependency.rb,
lib/liveness/dependencies.rb,
lib/liveness/dependencies/mysql.rb,
lib/liveness/dependencies/redis.rb,
lib/liveness/dependencies/postgresql.rb

Overview

The Rack middleware to provide health check endpoints.

Since:

  • 0.1.0

Defined Under Namespace

Modules: Dependencies Classes: Access, Config, Container, Dependency, Status

Constant Summary collapse

LOCK =

Since:

  • 0.1.0

Mutex.new
VERSION =

Since:

  • 0.1.0

'0.3.2'

Class Method Summary collapse

Class Method Details

.config(&block) ⇒ Liveness::Config

Returns:

Since:

  • 0.1.0



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/liveness.rb', line 24

def config(&block)
  return @config if @config

  LOCK.synchronize do
    return @config if @config

    @config = Config.new(&block)
  end

  @config
end

.containerLiveness::Container

Returns:

Since:

  • 0.1.0



39
40
41
# File 'lib/liveness.rb', line 39

def container
  @container ||= Container.new
end