module HoundDog

Overview

Transparently manage service discovery through consistent hashing and ETCD

Included Modules

Defined in:

hound-dog.cr
hound-dog/discovery.cr
hound-dog/service.cr
hound-dog/settings.cr

Constant Summary

HABITAT_SETTINGS = [{decl: service_namespace : String = ENV["HD_SERVICE_NAMESPACE"]? || "service", example: nil, validation: nil}, {decl: etcd_host : String = ENV["ETCD_HOST"]? || "127.0.0.1", example: nil, validation: nil}, {decl: etcd_port : Int32 = (ENV["ETCD_PORT"]? || 2379).to_i, example: nil, validation: nil}, {decl: etcd_ttl : Int64 = (ENV["ETCD_TTL"]? || 15).to_i64, example: nil, validation: nil}] of Nil
Log = ::Log.for(self)

Class Method Summary

Instance Method Summary

Class Method Detail

def self.configure(&) #

[View source]
def self.etcd_client #

Single connection


[View source]
def self.etcd_client(&) #

Yield etcd connection, closing after block returns


[View source]
def self.settings #

[View source]

Instance Method Detail

def settings #

[View source]