Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoListener = errors.New("No Listener")
ErrNoListener is returned from Listen() when the Server didn't manage to find the required inherited socket to listen on (when Server.InheritOnly is true)
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
*graceful.Server
// ListenerFdName can be set to pick a named file descriptor as
// Listener via LISTEN_FDNAMES
// It is updated to contain the name of the chosen file descriptor
// - if any
ListenerFdName string
// Extra sd.FileTest to apply to the listener inherited.
ExtraFileTests []sd.FileTest
// InheritOnly set to true requires the Listener to be inherited via
// the environment and there will not be created a fresh Listener.
// Setting InheritOnly true will also disable port 80 as default port
// and let the Serve listen on any inherited TCP socket it gets
InheritOnly bool
// PrepareListener provides a callback to do last minute modifications of
// the chosen listener. (like wrapping it in something else)
// It will be called as a callback with the listener chosen before it's set.
// The returned listener is set instead - wrapped in any TLS if
// there's a TLSConfig set.
PrepareListener func(net.Listener) net.Listener
// contains filtered or unexported fields
}
Server wraps around gone/http/graceful HTTP server implementing gone/the daemon/srv.Server interface If ErrorLog is set, errors will be logged to it.
func (*Server) Description ¶
Description implement gone/daemon/srv.Descripter interface.
Click to show internal directories.
Click to hide internal directories.