httpserver

package
v2.33.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalAndWriteJSONResponse

func MarshalAndWriteJSONResponse(ctx context.Context, w http.ResponseWriter, r *http.Request, code int, v interface{}) []byte

MarshalAndWriteJSONResponse will JSON marshal the incoming data and return the serialized version

func MethodNotAllowedHandler added in v2.2.0

func MethodNotAllowedHandler() http.Handler

func NewGeneralCacheKey added in v2.2.0

func NewGeneralCacheKey(req *http.Request) string

func NewUserSpecificCacheKey added in v2.2.0

func NewUserSpecificCacheKey(ctx context.Context, req *http.Request) (_ string, err error)

func SetupDatadogInstrumentation

func SetupDatadogInstrumentation(service, awsRegion, awsAccountID, stage string) *datadog.Exporter

func StartHealthServer

func StartHealthServer(port string)

func StatusNotFoundHandler

func StatusNotFoundHandler() http.Handler

func UnmarshalRequest

func UnmarshalRequest(body io.ReadCloser, v interface{}) error

func WriteJSONResponse

func WriteJSONResponse(ctx context.Context, w http.ResponseWriter, r *http.Request, code int, body []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL