roundns

command module
v0.0.0-...-1b25942 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 17 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.

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址