This is Golang Jsonrpc(v2) Package
- Install Dependencies
$ godep restore
- Start Server
$ go run demo/server.go
- Run Tests (Client)
$ go test -v demo/server_test.go
The graceful restart feature of server is based on endless. Check examples for more information.
The endless server will listen for the following signals: syscall.SIGHUP
, syscall.SIGUSR1
, syscall.SIGUSR2
, syscall.SIGINT
, syscall.SIGTERM
, and syscall.SIGTSTP
:
SIGHUP
will trigger a fork/restart
syscall.SIGINT
and syscall.SIGTERM
will trigger a shutdown of the server (it will finish running requests)
SIGUSR2
will trigger hammerTime
SIGUSR1
and SIGTSTP
are listened for but do not trigger anything in the endless server itself. (probably useless - might get rid of those two)