Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUnixListener ¶
func NewUnixListener(v *viper.Viper) (*net.UnixListener, error)
Open and return a listening unix socket.
func Run ¶
func Run(v *viper.Viper, l *net.UnixListener)
Run the server's accept loop, waiting for connections from l. Correct shutdown procedure is: set slots to a number such that no new processes will run wait for all running processes to finish set shittingDown to true close the listening socket
Types ¶
type Request ¶
type Request struct { Type RequestType HasFds bool // List of Fds to be transferred by SendRequest Fds []int // Filled in on receiving side - list of fd numbers corresponding to // the original FD numbers above ReceivedFds []int Run *RequestRun Config *RequestConfig }
type RequestConfig ¶
type RequestConfig struct { // nil indicates lack of presence Parallel *int }
type RequestRun ¶
type RequestType ¶
type RequestType int
const ( REQUEST_RUN RequestType = iota REQUEST_WAIT REQUEST_GETPID REQUEST_KILL REQUEST_SHUTDOWN REQUEST_CONFIG )
type Response ¶
type Response struct { Type ResponseType Message string Getpid *ResponseGetpid Wait *ResponseWait }
type ResponseGetpid ¶
type ResponseGetpid struct {
Pid int
}
type ResponseType ¶
type ResponseType int
The server's response. If OK or ERR, message will contain useful text.
const ( RESPONSE_ERR ResponseType = iota RESPONSE_OK RESPONSE_GETPID RESPONSE_WAIT )
type ResponseWait ¶
type ResponseWait struct {
ExitStatus int
}
Click to show internal directories.
Click to hide internal directories.