{"modulePath":"github.com/codedellemc/libstorage","version":"v0.6.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package server\n\n## Variables\n\n```go\nvar (\n\t// DisableStartupInfo is a flag that indicates whether or not to print\n\t// startup info. This is sometimes disabled for CI systems to reduce logs.\n\tDisableStartupInfo, _ = strconv.ParseBool(os.Getenv(\n\t\t\"LIBSTORAGE_DISABLE_STARTUP_INFO\"))\n)\n```\n\n## Functions\n\n```go\nfunc Close() \u003c-chan error\n```\nClose closes all servers. This function can be used when a calling program traps UNIX signals or when it exits gracefully.\n\n```go\nfunc CloseOnAbort()\n```\nCloseOnAbort is a helper function that can be called by programs, such as tests or a command line or service application.\n\n```go\nfunc Serve(\n\tgoCtx gocontext.Context,\n\tconfig gofig.Config) (types.Server, \u003c-chan error, error)\n```\nServe 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.\n\n## Types\n\n```go\ntype HTTPServer struct {\n\t// contains filtered or unexported fields\n}\n```\nHTTPServer contains an instance of http server and the listener.\n\nsrv \\*http.Server, contains configuration to create a http server and a mux router with all api end points.\n\nl   net.Listener, is a TCP or Socket listener that dispatches incoming request to the router.\n\n```go\nfunc (s *HTTPServer) Close() error\n```\nClose closes the HTTPServer from listening for the inbound requests.\n\n```go\nfunc (s *HTTPServer) Context() types.Context\n```\nContext returns this server's types.\n\n```go\nfunc (s *HTTPServer) Serve() error\n```\nServe starts listening for inbound requests.\n\n","path":"github.com/codedellemc/libstorage/api/server","name":"server","synopsis":"","isRedistributable":true}
