Documentation ¶
Index ¶
- func NewDefaultConfig() *config
- func NewOpenTelemetryMiddleware(service string) mux.MiddlewareFunc
- type Option
- func WithHost(host string) Option
- func WithIdleTimeout(timeout time.Duration) Option
- func WithPort(port int) Option
- func WithReadTimeout(timeout time.Duration) Option
- func WithRevision(revision string) Option
- func WithTracer() Option
- func WithTracerServiceName(name string) Option
- func WithVersion(version string) Option
- func WithWriteTimeout(timeout time.Duration) Option
- type RuntimeResponse
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *config
NewDefaultConfig returns a new default config.
func NewOpenTelemetryMiddleware ¶
func NewOpenTelemetryMiddleware(service string) mux.MiddlewareFunc
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies server configuration options.
func WithIdleTimeout ¶
WithIdleTimeout sets the idle timeout for the server.
func WithReadTimeout ¶
WithReadTimeout sets the read timeout for the server.
func WithRevision ¶
WithRevision sets the revision for the server.
func WithTracerServiceName ¶
WithTracerServiceName sets the tracer service name for the server.
func WithVersion ¶
WithVersion sets the version for the server.
func WithWriteTimeout ¶
WithWriteTimeout sets to write timeout for the server.
type RuntimeResponse ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) JSONResponse ¶
func (s *Server) JSONResponse(w http.ResponseWriter, _ *http.Request, result interface{})
JSONResponse is a helper function to write a JSON response to the client.
Click to show internal directories.
Click to hide internal directories.