Documentation
¶
Overview ¶
Package socketlistener provides a worker that will listen on a specified unix socket identified by a file descriptor. Handlers are provided to the worker that specify endpoints and define the action to be taken when they are reached.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Logger logger.Logger // SocketName is the socket file descriptor. SocketName string // RegisterHandlers should register handlers on the router with // router.HandlerFunc or similar. RegisterHandlers func(router *mux.Router) // ShutdownTimeout is how long the socketlistener has to gracefully shutdown // when Kill is called on the worker. ShutdownTimeout time.Duration }
Config represents configuration for the socketlistener worker.
type SocketListener ¶
type SocketListener struct {
// contains filtered or unexported fields
}
SocketListener is a socketlistener worker.
func NewSocketListener ¶
func NewSocketListener(config Config) (*SocketListener, error)
NewSocketListener returns a socketlistener with the given config.
func (*SocketListener) Kill ¶
func (sl *SocketListener) Kill()
Kill is part of the Worker.worker interface.
func (*SocketListener) Wait ¶
func (sl *SocketListener) Wait() error
Wait is part of the Worker.worker interface.
Click to show internal directories.
Click to hide internal directories.