Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// DisableStartupInfo is a flag that indicates whether or not to print
// startup info. This is sometimes disabled for CI systems to reduce logs.
DisableStartupInfo, _ = strconv.ParseBool(os.Getenv(
"LIBSTORAGE_DISABLE_STARTUP_INFO"))
)
Functions ¶
func Close ¶
func Close() <-chan error
Close closes all servers. This function can be used when a calling program traps UNIX signals or when it exits gracefully.
func CloseOnAbort ¶
func CloseOnAbort()
CloseOnAbort is a helper function that can be called by programs, such as tests or a command line or service application.
func Serve ¶
Serve starts serving the configured libStorage endpoints. This function returns a channel on which errors are received. Reading this channel is also the prescribed manner for clients wishing to block until the server is shutdown as the error channel will be closed when the server is stopped.
Types ¶
type HTTPServer ¶
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 ¶
func (s *HTTPServer) Close() error
Close closes the HTTPServer from listening for the inbound requests.
func (*HTTPServer) Context ¶
func (s *HTTPServer) Context() types.Context
Context returns this server's types.
func (*HTTPServer) Serve ¶
func (s *HTTPServer) Serve() error
Serve starts listening for inbound requests.