Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶ added in v1.9.0
Addr contains string representation of address and its protocol (tcp, unix...).
type Config ¶ added in v1.9.0
type Config struct { Logging bool EnableCors bool CorsHeaders string AuthorizationPluginNames []string Version string SocketGroup string TLSConfig *tls.Config Addrs []Addr }
Config provides the configuration for the API server
type HTTPServer ¶ added in v1.9.0
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer contains an instance of http server and the listener. srv *http.Server, contains configuration to create a http server and a mux router with all api end points. l net.Listener, is a TCP or Socket listener that dispatches incoming request to the router.
func (*HTTPServer) Close ¶ added in v1.9.0
func (s *HTTPServer) Close() error
Close closes the HTTPServer from listening for the inbound requests.
func (*HTTPServer) Serve ¶ added in v1.9.0
func (s *HTTPServer) Serve() error
Serve starts listening for inbound requests.
type Server ¶ added in v1.4.0
type Server struct {
// contains filtered or unexported fields
}
Server contains instance details for the server
func New ¶ added in v1.7.0
New returns a new instance of the server based on the specified configuration. It allocates resources which will be needed for ServeAPI(ports, unix-sockets).
func (*Server) Close ¶ added in v1.4.0
func (s *Server) Close()
Close closes servers and thus stop receiving requests
func (*Server) InitRouters ¶ added in v1.9.0
InitRouters initializes a list of routers for the server.