Discover Packages
github.com/macrat/roundns
command
module
Version:
v0.0.0-...-1b25942
Opens a new window with list of versions in this module.
Published: Feb 11, 2021
License: MIT
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
RoundNS
Simplest DNS server for health-checking and load-balancing.
How to use
1. Make config file
#address: :53
#log:
# level: warn
#metrics:
# namespace: roundns
# address: :8553
#ttl: 5m # default TTL
services:
- fqdn: a.test.local.
type: A
ttl: 300
strategy: round-robin
health:
command:
- "/bin/sh"
- "-c"
- "curl -fs http://$HOST"
interval: 1m
hosts:
- 127.0.0.1
- 127.0.0.2
- fqdn: b.test.local.
type: A
ttl: 5m
health:
command: curl -fs http://$HOST # It's shorthand of ["sh", "-c", "curl -fs http://$HOST"]
interval: 1h
hosts:
- 127.0.1.1
- 127.0.1.2
- fqdn: c.test.local.
type: A
health: curl -fs http://$HOST # It's shorthand more
hosts:
- 127.0.1.1
- 127.0.1.2
# load balancing without health checking
- fqdn: cname.test.local.
type: CNAME
hosts:
- a.test.local.
- b.test.local.
2. Run server
$ roundns -config ./config.yml
Now server is running on 0.0.0.0:53/udp, and you can get metrics on http://127.0.0.1:8553/metrics
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.