Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shun159/brahman
ब्रह्मन् brahman
https://github.com/shun159/brahman
dns elixir ewma loadbalancer networking server
Last synced: 9 days ago
JSON representation
ब्रह्मन् brahman
- Host: GitHub
- URL: https://github.com/shun159/brahman
- Owner: shun159
- License: other
- Created: 2018-09-04T11:06:32.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2018-09-28T07:53:35.000Z (over 6 years ago)
- Last Synced: 2024-12-20T11:32:49.811Z (19 days ago)
- Topics: dns, elixir, ewma, loadbalancer, networking, server
- Language: Elixir
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
brahman (ब्रह्मन्)
====It is written as an extendable library for building DNS Balancer/Server.
Running it is pretty simple:- Start the `brahman` app
- Implement a socket server(using `:gen_udp` or `netlink`)
- Implement a handler function
- Call `Brahman.Dns.Handler.handle/2`Overview
====### Querying
Aims to make it as easy as possible to build DNS LB/Server.
```elixir
iex> packet = File.read!("test/packet_data/dns_query.raw")
iex> handler_fn = &IO.inspect/1
iex> Brahman.Dns.Handler.handle(packet, handler_fn)
```The `handler_fn` is a higher order function or form of `{function(), [:args]}`.
### Zone Interfaces
- `Brahman.Dns.Zones.put/2`
```elixir
name = "example.com"records = [
%{
name: "dummy1.example.com",
type: "A",
ttl: 3600,
data: %{ip: "192.168.5.1"}
},
%{
name: "dummy2.example.com",
type: "A",
ttl: 3600,
data: %{ip: "192.168.5.2"}
},
%{
name: "dummy3.example.com",
type: "A",
ttl: 3600,
data: %{ip: "192.168.5.3"}
}
]:ok = Brahman.Dns.Zones.put(name, records)
```- `Brahman.Dns.Zones.get/1`
```elixir
^records = Brahman.Dns.Zones.get("example.com")
```- `Brahman.Dns.Zones.delete/1`
```elixir
:ok = Brahman.Dns.Zones.delete("example.com")
[] = Brahman.Dns.Zones.get("example.com")
```Status
===__Under development__
License
-------
Tres is released under the __SUSHI-WARE LICENSE__.__私に寿司をおごってください__