This Agent performs DNS requests that HAProxy will ask it to do. It embeds for now 2 engines for A and PTR resolutions.
You can customize spoe-message
for each engine with the event
and the args
to be sent.
You can't change the name of the arg, only its value.
The file spoa-do-resolve.conf
provided in this repo shows configuration example to use this agent.
Corresponding HAProxy configuration is also provided.
This is recommended to use with HAProxy 2.0+.
First, do the go get
thing.
You can easily test the solution using 3 shells:
- run the agent:
make run
- run haproxy:
haproxy -d -f ./haproxy.cfg
- run
curl
against HAProxy and observe the result in the log line sent to stdout
First, do the go get
thing, then simply run make build
Currently supported command line arguments:
Usage of ./spoa-do-resolve:
-debug
turn on debug messages
None or check issues of this project.
- command line argument (flag) for:
- custom DNS servers (default uses the OS ones)
- files for Debug, Info, Warning and Error functions
- allow HAProxy to send a list of DNS server IPs to use for this request
- new SPOE engine for "full A+PTR" resolution
- cache the DNS respones in the agent