g53

command module
v0.0.0-...-19bb427 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

README

G53

Build Status Build Status Coverage Status codebeat badge Go Report Card

Build
Building without docker:
export GOPATH=/tmp/go
export PATH=${PATH}:${GOPATH}/bin
go get -v github.com/tools/godep
go get -d -v github.com/hawkingrei/g53
cd ${GOPATH}/src/github.com/hawkingrei/g53
godep restore
cd ${GOPATH}/src/github.com/hawkingrei/g53/
make all
Building with docker:
wget https://raw.githubusercontent.com/hawkingrei/G53/master/Dockerfile
sudo docker build -t g53 .
sudo docker run -d -p 80:80 -p 53:53/udp  g53
HTTP API
# show all active services
curl http://<host>:<ip>/services

# add new service manually
curl http://<host>:<ip>/service -X PUT --data-ascii '{"RecordType":"A","Value":"127.0.0.1","TTL":3600,"Aliases":"c.d.net"}'

# get a service 
curl http://<host>:<ip>/service -X GET  --data-ascii '{"RecordType":"A","Aliases":"c.d.net"}'

# remove a service
curl http://<host>:<ip>/service  -X DELETE '{"RecordType":"A","Value":"127.0.0.1","TTL":3600,"Aliases":"c.d.net"}'

# set new default TTL value
curl http://<host>:<ip>/set/ttl -X PUT --data-ascii '10'

# get version information
curl http://<host>:<ip>/version
To do
  • Support tls
  • Update restful
  • Update document
  • Add lock-free cache

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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