Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe serves an http server over TCP
func ListenAndServePprof ¶
ListenAndServePprof starts a pprof server
func New ¶
New creates a new http server
Example:
srv, _ := server.New(&server.Config{ Addr: ":8080", Handler: http.DefaultServeMux, Options: []server.Option{ server.WithLogging("my-server"), server.WithMetrics("my-server"), server.WithRecovery(), server.WithTracing("opentracing-server:6831", "my-server"), } })
srv.ListenAndServe(context.Background())
Types ¶
Click to show internal directories.
Click to hide internal directories.