Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeadersFromRequestContext ¶
GetHeadersFromRequestContext tries to get the request headers from the context
Parameters:
- ctx: The context to get the request headers from
Returns:
- http.Header: The request headers - error: If there was an error getting the request headers
Types ¶
type DefaultInterceptor ¶ added in v0.2.1
type DefaultInterceptor struct{}
DefaultInterceptor is the default interceptor
func (DefaultInterceptor) CreateClientContextFromRequestContext ¶ added in v0.2.1
func (i DefaultInterceptor) CreateClientContextFromRequestContext( originalCtx context.Context, headers ...string, ) (ctx context.Context, callInfo connect.CallInfo, err error)
CreateClientContextFromRequestContext creates a client context from the request context, injecting specified headers
Parameters:
- originalCtx: the request context - headers: the headers to inject
Returns:
- context.Context: the client context - error: if there was an error creating the client context
Click to show internal directories.
Click to hide internal directories.