Documentation ¶
Index ¶
- Constants
- Variables
- func NewRouter() *mux.Router
- func Serve(name string, functionHandler http.HandlerFunc)deprecated
- func ServeFunction(name string, functionHandler http.HandlerFunc, options ...serveOption)
- func ServeRouter(name string, router *mux.Router, options ...serveOption)
- func WithHealthCheckHandlerFunc(handlerFunc http.HandlerFunc) serveOption
- func WithSentryClientOptions(options sentry.ClientOptions) serveOption
- func WithSentryDebug(debug bool) serveOptiondeprecated
- func WithServiceListenAddress(address string) serveOption
- func WithWebListenAddress(address string) serveOption
- func WithoutServiceEndpoint() serveOption
Constants ¶
const ( DefaultFunctionAddress = ":8080" DefaultMetricsAddress = ":8081" )
Variables ¶
var (
FunctionName string
)
Functions ¶
func Serve
deprecated
func Serve(name string, functionHandler http.HandlerFunc)
Serve is a helper function to start a server with a single function handler
Deprecated: Use ServeFunction instead
func ServeFunction ¶ added in v1.0.5
func ServeFunction(name string, functionHandler http.HandlerFunc, options ...serveOption)
ServeFunction starts a server with a single handler function
func ServeRouter ¶ added in v1.0.5
ServeRouter starts a server with a set of routes
func WithHealthCheckHandlerFunc ¶ added in v1.4.0
func WithHealthCheckHandlerFunc(handlerFunc http.HandlerFunc) serveOption
WithHealthCheckHandlerFunc sets the handler function for the healthcheck endpoint
func WithSentryClientOptions ¶ added in v1.5.0
func WithSentryClientOptions(options sentry.ClientOptions) serveOption
WithSentryClientOptions configures the sentry client sdk
func WithSentryDebug
deprecated
added in
v1.3.0
func WithSentryDebug(debug bool) serveOption
WithSentryDebug sets the debug flag for sentry This option will be overwritten by WithSentryClientOptions if used together
Deprecated: Use WithSentryClientOptions instead
func WithServiceListenAddress ¶ added in v1.2.0
func WithServiceListenAddress(address string) serveOption
WithServiceListenAddress sets the address for the service (healthcheck/metrics) listener
func WithWebListenAddress ¶ added in v1.2.0
func WithWebListenAddress(address string) serveOption
WithWebListenAddress sets the address for the web listener
func WithoutServiceEndpoint ¶ added in v1.3.1
func WithoutServiceEndpoint() serveOption
WithoutServiceEndpoint disables the metrics/healthcheck endpoint
Types ¶
This section is empty.