package
0.2.21
Repository: https://github.com/plainq/servekit.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
HealthCheckAccessLog represents an optional function for WithHealthCheck function.
HealthChecker represents an optional function for WithHealthCheck function.
HealthCheckMetricsForEndpoint represents an optional function for WithHealthCheck function.
HealthCheckRoute represents an optional function for WithHealthCheck function.
HTTPServerIdleTimeout sets the http.Server IdleTimeout.
HTTPServerReadHeaderTimeout sets the http.Server ReadHeaderTimeout.
HTTPServerReadTimeout sets the http.Server ReadTimeout.
HTTPServerWriteTimeout sets the http.Server WriteTimeout.
LoggingMiddleware represents logging middleware.
MetricsAccessLog represents an optional function for WithMetrics function.
MetricsMetricsForEndpoint represents an optional function for WithMetrics function.
MetricsMiddleware represents HTTP metrics collecting middlewares.
MetricsRoute represents an optional function for WithMetrics function.
NewClient takes options to configure and return a pointer to a new instance of http.Client.
NewListenerHTTP creates a new ListenerHTTP with the specified address and options.
NewListenerOption returns a slice of ListenerOption[T].
No description provided by the author
No description provided by the author
No description provided by the author
WithCustomDialer sets given dialer as custom net.Dialer underlying http.Transport of http.Client.
WithDialTimeout sets the Dial timeout to underlying http.Transport of http.Client.
WithGlobalMiddlewares sets given middlewares as router-wide middlewares.
WithHealthCheck turns on the health check endpoint.
WithHTTPServerTimeouts configures the HTTP listener TimeoutsConfig.
WithKeepAliveDisabled sets the.
WithKeepAliveTimeout sets the KeepAlive timeout to underlying http.Transport of http.Client.
WithLogger sets the server logger.
WithMaxIdleConns sets the MaxIdleConns value to underlying http.Transport of http.Client.
WithMaxIdleConnsPerHost sets the MaxIdleConnsPerHost value to underlying http.Transport of http.Client.
WithMetrics turns on the metrics endpoint.
WithProfiler turns on the profiler endpoint.
WithReadBufferSize sets the ReadBufferSize value to underlying http.Transport of http.Client.
WithResponseHeaderTimeout sets the ResponseHeaderTimeout value to underlying http.Transport of http.Client.
WithRetries configure http.Client to do retries when request failed and retry could be made.
WithTLS sets the TLS certificate and key to be used by the HTTP server.
WithTLSHandshakeTimeout sets timeout for TLS handshake to underlying http.Transport of http.Client, after which connection will be terminated.
WithWriteBufferSize sets the WriteBufferSize value to underlying http.Transport of http.Client.

# Structs

Config holds configuration options which will be applied to http.Client.
HealthConfig represents configuration for builtin health check route.
ListenerConfig holds ListenerHTTP configuration.
No description provided by the author
MetricsConfig represents configuration for builtin metrics route.
PPROFConfig represents configuration for builtin profiler route.
TimeoutsConfig holds an HTTP server TimeoutsConfig configuration.

# Interfaces

CustomDialer holds logic of establishing connection to remote network address.
ListenerOptionConstraint represents a constraint for generic types that are related to ListenerOption.

# Type aliases

ClientOption represents functional options pattern for Config type.
ListenerOption implements functional options pattern for the ListenerHTTP type.
Middleware represents a function type that serves as a middleware in an HTTP server.