update icon.png, privacy-policy.pdf, server.go
This commit is contained in:
commit
3070e9d1ab
3 files changed
+27
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
package esauth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
httpServer *http.Server
|
||||
}
|
||||
|
||||
func (s *Server) Run(port string, handler http.Handler) error {
|
||||
s.httpServer = &http.Server{
|
||||
Addr: ":" + port,
|
||||
Handler: handler,
|
||||
MaxHeaderBytes: 1 << 20,
|
||||
ReadTimeout: 10 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
return s.httpServer.ListenAndServe()
|
||||
}
|
||||
|
||||
func (s *Server) Shutdown(ctx context.Context) error {
|
||||
return s.httpServer.Shutdown(ctx)
|
||||
}
|
||||
Reference in new issue
Block a user