Documentation ¶
Index ¶
- Constants
- func ClientIpFromRequest(ctx context.Context, listenerCfg *listenerutil.ListenerConfig, r *http.Request) (string, error)
- func GeneratedTraceId(ctx context.Context) string
- func NewEventingListener(ctx context.Context, baseLn net.Listener) (net.Listener, error)
- func WrapWithEventsHandler(h http.Handler, e *event.Eventer, kms *kms.Kms, ...) (http.Handler, error)
- func WrapWithOptionals(ctx context.Context, with *writerWrapper, wrap http.ResponseWriter) (http.ResponseWriter, error)
Constants ¶
View Source
const ReverseGrpcConnectionAlpnValue = "the-downstream-dialer-plays-an-uno-reverse-card"
Variables ¶
This section is empty.
Functions ¶
func ClientIpFromRequest ¶
func ClientIpFromRequest(ctx context.Context, listenerCfg *listenerutil.ListenerConfig, r *http.Request) (string, error)
ClientIpFromRequest will determine the client IP of the http request
func GeneratedTraceId ¶
GeneratedTraceId returns a boundary generated TraceId or "" if an error occurs when generating the id.
func NewEventingListener ¶ added in v0.10.0
func WrapWithEventsHandler ¶
func WrapWithEventsHandler(h http.Handler, e *event.Eventer, kms *kms.Kms, listenerCfg *listenerutil.ListenerConfig) (http.Handler, error)
WrapWithEventsHandler will wrap the provided http.Handler with a handler that adds an Eventer to the request context and starts/flushes gated events of type: observation and audit
func WrapWithOptionals ¶
func WrapWithOptionals(ctx context.Context, with *writerWrapper, wrap http.ResponseWriter) (http.ResponseWriter, error)
WrapWithOptionals will test the wrap ResponseWriter and test it for various optional interfaces: http.Flusher, http.Pusher and http.Hijacker. It return an http.ResponseWriter that satisfies those optional interfaces.
See: https://medium.com/@cep21/interface-wrapping-method-erasure-c523b3549912
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.