Sha256: f1d34f314a31912c5baa4ad2fd5c4b22ce58121fd2653da1fdbff12d12b5dbd9
Contents?: true
Size: 760 Bytes
Versions: 5
Compression:
Stored size: 760 Bytes
Contents
module LitmusPaper class AgentCheckHandler def self.handle(service) output = [] health = LitmusPaper.check_service(service) if health.nil? output << "failed#NOT_FOUND" else case health.direction when :up, :health output << "ready" # administrative state output << "up" # operational state when :down output << "drain" # administrative state when :none if health.ok? output << "ready" # administrative state output << "up" # operational state else output << "down" # operational state end end output << "#{health.value.to_s}%" end output.join("\t") end end end
Version data entries
5 entries across 5 versions & 1 rubygems