Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a tcp server that receives commands and interacts with a storage layer
type ServerOption ¶
type ServerOption func(*options)
ServerOption overrides a default option
func ReadTimeout ¶
func ReadTimeout(t time.Duration) ServerOption
ReadTimeout overrides the default read timeout to the duration passed in If overriding ShutdownTimeout as well, ReadTimeout should be greater than ShutdownTimeout
func ShutdownTimeout ¶
func ShutdownTimeout(t time.Duration) ServerOption
ShutdownTimeout overrides the default value for how long the server will wait for connections to finish being handled before forcefully shutting down (Server.Serve exits). If ReadTimeout > ShutdownTimeout there may be cases where connections don't get enough time to close before Server.Serve exits.
Click to show internal directories.
Click to hide internal directories.