package
1.0.1
Repository: https://github.com/gourd/kit.git
Documentation: pkg.go.dev

# README

Context

Context provides a simple wrapper of github.com/gorilla/context.

It is based on gorilla.go in on a The Go Blog post, Go Concurrency Pattern.

Slight improvement are done to make it better by default.

Licence

Besides wrapper, which is written Sameer Ajmani, this software is licenced with MIT Licence. You may find a copy of the licence in the LICENCE file in the root folder.

# Functions

ClearGorilla implements go-kit endpoint.Middleware that removes all values stored for a given request.
GetID get the string ID from request.
GetRequestID get string id from http request.
HTTPRequest returns the *http.Request associated with ctx using NewContext, if any.
New returns a context.Context that also return gorilla/context values.
NewEmpty returns a basic implementation of context.Context that has no value at all.
UseGorilla implements go-kit http transport RequestFunc.
UseID add a string id to http request header and context.
WithGorilla wraps a given context.Context with our wrapper context.
WithHTTPRequest adds the current HTTP Request to context.Context.
WithID add a string ID to the context (for session tracking).

# Constants

IDHeaderKey is the string key used to store context ID in HTTP header.