Documentation ¶ Index ¶ func ServeHTTP(config *Config) error func ServeHTTPS(config *Config) error func WaitTermSig(handler func(context.Context) error) <-chan struct{} type Config type GRPC type HTTP Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ServeHTTP ¶ func ServeHTTP(config *Config) error func ServeHTTPS ¶ func ServeHTTPS(config *Config) error func WaitTermSig ¶ func WaitTermSig(handler func(context.Context) error) <-chan struct{} Types ¶ type Config ¶ type Config struct { Port int `yaml:"port"` ReadTimeout int `yaml:"read_timeout"` WriteTimeout int `yaml:"write_timeout"` MaxHeaderByte int `yaml:"max_header_byte"` Handler http.Handler CertFile string KeyFile string } type GRPC ¶ type GRPC interface { GracefulStop() Stop() Serve(l net.Listener) error } GRPC represents interface for grpc server type HTTP ¶ type HTTP interface { Shutdown(ctx context.Context) error ListenAndServer() error ListenAndServerTLS(certFile, keyFile string) error } HTTP represents interface for HTTP/s server Source Files ¶ View all Source files definition.go graceful.go Click to show internal directories. Click to hide internal directories.