Run starts the server according to the provided configuration.
()
| 52 | |
| 53 | // Run starts the server according to the provided configuration. |
| 54 | func (s *Server) Run() error { |
| 55 | if err := s.validate(); err != nil { |
| 56 | return err |
| 57 | } |
| 58 | |
| 59 | // no TLS mode specified, run in http mode. |
| 60 | if s.tlser == nil { |
| 61 | return s.runHTTP() |
| 62 | } |
| 63 | |
| 64 | return s.tlser.Run(s.server) |
| 65 | } |
| 66 | |
| 67 | // Shutdown gracefully shuts down the server and releases resources. |
| 68 | func (s *Server) Shutdown(ctx context.Context) error { |