https://github.com/hauleth/consulate
Erlang port mapper module that uses Consul instead of EPMD
https://github.com/hauleth/consulate
consul distribution erlang
Last synced: about 1 year ago
JSON representation
Erlang port mapper module that uses Consul instead of EPMD
- Host: GitHub
- URL: https://github.com/hauleth/consulate
- Owner: hauleth
- License: apache-2.0
- Created: 2020-06-26T08:02:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T10:36:19.000Z (almost 6 years ago)
- Last Synced: 2025-04-09T07:11:33.236Z (about 1 year ago)
- Topics: consul, distribution, erlang
- Language: Erlang
- Homepage:
- Size: 10.7 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Consulate
=====
The implementation of `erl_epmd`-compatible module that uses Consul for node
discover instead of EPMD.
## Usage
Add project to your dependencies
Erlang:
```erlang
{deps, [consulate]}.
```
Elixir:
```elixir
defp deps do
[
{:consulate, "~> 0.0"}
]
end
```
And then run your application with
```
-epmd_module consulate -start_epmd false
```
## Configuration
You can change default `erlang-node` service name via `-consul_service` flag to
`erl`. Beware that all nodes that want to be connected need to use the same
service name.
Consul connection options are set via application environment. Supported options
are:
- `host` (defaults to `127.0.0.1`) - host to Consul agent
- `port` (defaults to `8500`) - port on which agent is listening
- `scheme` (defaults to `http`) - connection scheme, can be `"http"`
or `"https"`
- `check` - map containing 2 fields:
+ `interval` (defaults to `10`) - time in seconds between each health check
+ `deregister` (defaults to `60`) - time in seconds after which the service
will be deregistered from catalog after it fails test
- `meta` - map of `atom() => atom() | binary()` pairs that will be submitted as
service metadata
## License
See [LICENSE](LICENSE)