Documentation
¶
Index ¶
Constants ¶
View Source
const StopWaitTime = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Host string `env:"HOST" envDefault:"localhost"`
Port string `env:"PORT" envDefault:""`
CertFile string `env:"SERVER_CERT" envDefault:""`
KeyFile string `env:"SERVER_KEY" envDefault:""`
ReadTimeout time.Duration `env:"SERVER_READ_TIMEOUT" envDefault:"15s"`
WriteTimeout time.Duration `env:"SERVER_WRITE_TIMEOUT" envDefault:"15s"`
ReadHeaderTimeout time.Duration `env:"SERVER_READ_HEADER_TIMEOUT" envDefault:"5s"`
IdleTimeout time.Duration `env:"SERVER_IDLE_TIMEOUT" envDefault:"60s"`
MaxHeaderBytes int `env:"SERVER_MAX_HEADER_BYTES" envDefault:"1048576"`
}
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start() error
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop() error
Click to show internal directories.
Click to hide internal directories.