transport

package
v1.3.25 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachRoutes

func AttachRoutes(e endpoint.Endpoints, logger kitlog.Logger) http.Handler

AttachRoutes wire handlers with routes

func HTTPGenerateXRequestID

func HTTPGenerateXRequestID() kithttp.RequestFunc

func HTTPRequestEndpoint

func HTTPRequestEndpoint(endpoint string) kithttp.RequestFunc

HTTPRequestEndpoint includes a new request ctx entry indicating which endpoint was requested.

func HTTPRequestLogger

func HTTPRequestLogger(logger kitlog.Logger) kithttp.RequestFunc

func HTTPReturnXRequestID

func HTTPReturnXRequestID() kithttp.ServerResponseFunc

func HTTPServerFinalizerFunc

func HTTPServerFinalizerFunc(logger kitlog.Logger) kithttp.ServerFinalizerFunc

Types

type CustomCtxKey

type CustomCtxKey int

CustomCtxKey represents a custom key type for API requests context.

const (
	// ContextKeyEndpoint is the context key
	// for the requested API endpoint.
	ContextKeyEndpoint CustomCtxKey = iota
)

Jump to

Keyboard shortcuts

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