Documentation ¶
Overview ¶
Package server contains utility functions for Seesaw v2 server components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPCAccept ¶
RPCAccept accepts connections on the listener and dispatches them to the RPC server for service. Unfortunately the native Go rpc.Accept function fatals on any accept error, including temporary failures and closure of the listener.
func RemoveUnixSocket ¶
RemoveUnixSocket checks to see if the given socket already exists and removes it if nothing responds to connections.
func ServerRunDirectory ¶
ServerRunDirectory ensures that the run directory exists and has the appropriate ownership and permissions.
func ShutdownHandler ¶
func ShutdownHandler(server Shutdowner)
ShutdownHandler configures signal handling and initiates a shutdown if a SIGINT, SIGQUIT or SIGTERM is received by the process.
Types ¶
type Shutdowner ¶
type Shutdowner interface {
Shutdown()
}
Shutdowner is an interface for a server that can be shutdown.