Documentation ¶
Index ¶
Constants ¶
View Source
const ( KB int64 = 1 << (10 * iota) MB GB TB )
Data size units.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
NewHTTPServer creates a new HTTP server with the given configuration.
It takes a pointer to a Config struct as a parameter. It returns a pointer to an httpServer struct.
func (*Server) Shutdown ¶
Shutdown shuts down the HTTP server.
It uses a context with a timeout of 5 seconds to gracefully shutdown the server. It returns an error if the server fails to shutdown.
Click to show internal directories.
Click to hide internal directories.