Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(srvConfig *Config)
Run will execute the server process with the provided config Reference: https://github.com/gorilla/mux#graceful-shutdown
Types ¶
type Config ¶
type Config struct { Domain string Port string Handler http.Handler WriteTimeout time.Duration ReadTimeout time.Duration IdleTimeout time.Duration DefaultTimeout time.Duration }
Config reprsents the configuration needed for the server
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig will create a default server configuration
func (*Config) UpdateDefaultTimeout ¶
UpdateDefaultTimeout will update the default timeout
func (*Config) UpdateHandler ¶
UpdateHandler will update the HTTP handler
func (*Config) UpdateIdleTimeout ¶
UpdateWriteTimeout will update the idle timeout
func (*Config) UpdatePort ¶
UpdatePort will update the port
func (*Config) UpdateReadTimeout ¶
UpdateWriteTimeout will update the read timeout
func (*Config) UpdateWriteTimeout ¶
UpdateWriteTimeout will update the write timeout
Click to show internal directories.
Click to hide internal directories.