hound-dog
Version, currently 2.9.127 versions
- 2.9.1latestMay 10, 2023
- 2.9.0not indexedMay 10, 2023
- 2.8.0not indexedMay 10, 2023
- 2.7.0not indexedMay 10, 2023
- 2.6.1not indexedMay 10, 2023
- 2.6.0not indexedMay 10, 2023
- 2.5.3not indexedMay 10, 2023
- 2.5.2not indexedMay 10, 2023
- 2.5.1not indexedMay 10, 2023
- 2.5.0not indexedMay 10, 2023
- 2.4.1not indexedMay 10, 2023
- 2.4.0not indexedMay 10, 2023
- 2.3.2not indexedMay 10, 2023
- 2.3.1not indexedMay 10, 2023
- 2.3.0not indexedMay 10, 2023
- 2.2.1not indexedMay 10, 2023
- 2.2.0not indexedMay 10, 2023
- 2.1.1not indexedMay 10, 2023
- 2.1.0not indexedMay 10, 2023
- 2.0.3not indexedMay 10, 2023
- 2.0.2not indexedMay 10, 2023
- 2.0.1not indexedMay 10, 2023
- 2.0.0not indexedMay 10, 2023
- 1.1.4not indexedMay 10, 2023
- 1.1.3not indexedMay 10, 2023
- 1.1.2not indexedMay 10, 2023
- 1.1.1not indexedMay 10, 2023
github.com/place-labs/hound-dog
Simple crystal lang etcd service tracker
4 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
hound-dog:
github: place-labs/hound-dog
version: ~> 2.9.1Then run:
shards installshard.yml
- Crystal
>= 0.35.1- License
- MIT
- Author
- Caspian Baska
Dependencies
Runtime Dependencies
- etcd~> 1.2github: place-labs/crystal-etcd
- ulid*github: place-labs/ulid
- tasker*github: spider-gazelle/tasker
- habitat*github: luckyframework/habitat
- retriable~> 0.2github: Sija/retriable.cr
- tokenizer*github: spider-gazelle/tokenizer
- log_helper~> 1.0github: spider-gazelle/log_helper
- rendezvous-hash*github: caspiano/rendezvous-hash
Development Dependencies
- ameba*github: crystal-ameba/amebadev
README
hound-dog
Library for self-registration and service discovery that utilises Etcd for distributed key-value storage. Wraps service data in etcd within a rendezvous hash
Usage
require "hound-dog"
HoundDog.configure do |settings|
settings.service_namespace = "service" # namespace for services
settings.etcd_host = "127.0.0.1" # etcd connection config
settings.etcd_port = 2379
settings.etcd_ttl = 30 # TTL for leases
end
# Create a new Discovery instance
discovery = HoundDog::Discovery.new(
service: "api",
uri: "https://api1:3000",
)
# There are already some nodes in etcd
discovery.nodes #=> [{name: "ulid1", uri: #<URI:0xdeadbeef @fragment=nil, @host="api0", @password=nil, @path="", @port=3000, @query=nil, @scheme="https", @user=nil>}]
discovery.find("sauce") #=> {name: "ulid1", uri: #<URI:0xdeadbeef @fragment=nil, @host="api0", @password=nil, @path="", @port=3000, @query=nil, @scheme="https", @user=nil>}
# Register self to etcd
spawn(same_thread: true) { discovery.register }
# Rendezvous hash transparently updated
discovery.nodes # [{name: "ulid1", uri: #<URI:0xdeadbeef @fragment=nil, @host="api0", @password=nil, @path="", @port=3000, @query=nil, @scheme="https", @user=nil>}, {name: "ulid2", uri: #<URI:0xbeefcafe @fragment=nil, @host="api0", @password=nil, @path="", @port=3000, @query=nil, @scheme="https", @user=nil>}]
etcd
Namespacing
All services are registered beneath configured service namespace, i.e. a node under namespace service will be keyed as service/#{service_name}/#{name}.
Values are base64 encoded strings in the form uri.
Version
Developed against ETCD_API=3 and etcd-server v3.3.13, using etcd's JSON-gRPC API gateway.
Testing
$ crystal spec
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Caspian Baska - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
2.9.1- Tagged
- May 10, 2023
- Commit
85a7b7ccc679- Crystal
>= 0.35.1- Indexed
- yes
Dependents
Repository
github.com/place-labs/hound-dog
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 27