Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ListenSpec string `yaml:"listen_spec" json:"listen_spec"` // HTTP Listener address string
ReadTimeout time.Duration `yaml:"read_timeout" json:"read_timeout"` // HTTP read timeout duration in sec - default 60 sec
WriteTimeout time.Duration `yaml:"write_timeout" json:"write_timeout"` // HTTP write timeout duration in sec - default 60 sec
IdleTimeout time.Duration `yaml:"idle_timeout" json:"idle_timeout"` // HTTP idle timeout duration in sec - default 60 sec
ShutdownTimeout time.Duration `yaml:"shutdown_timeout" json:"shutdown_timeout"` // service shutdown timeout in sec - default 30 sec
MaxHeaderBytes int `yaml:"max_header_bytes" json:"max_header_bytes"` // HTTP max header bytes - default 1 MB
UseProfile bool `yaml:"use_go_profile" json:"use_profile"` // use Go profiling
UseTLS bool `yaml:"use_tls" json:"use_tls"` // use Transport Level Security
TLSCertFile string `yaml:"tls_cert_file" json:"tls_cert_file"` // TLS Certificate file name
TLSKeyFile string `yaml:"tls_key_file" json:"tls_key_file"` // TLS Private key file name
TLSMinVersion uint16 `yaml:"tls_min_version" json:"tls_min_version"` // TLS min version VersionTLS13, VersionTLS12, VersionTLS11, VersionTLS10, VersionSSL30
TLSMaxVersion uint16 `yaml:"tls_max_version" json:"tls_max_version"` // TLS max version VersionTLS13, VersionTLS12, VersionTLS11, VersionTLS10, VersionSSL30
}
Config represent HTTP server options
type Server ¶
type Server struct {
// вложенные сервисы
Listener net.Listener // листинер HTTP сервера
Router *mux.Router // роутер HTTP сервера
HttpServer *http.Server // собственно HTTP сервер
HttpService *_http.Service // сервис HTTP запросов
// contains filtered or unexported fields
}
Server represent HTTP server
Click to show internal directories.
Click to hide internal directories.