Documentation ¶
Index ¶
- Constants
- func CopyGRPCHeadersClientInterceptor(deps copyHeadersDeps) grpc.UnaryClientInterceptor
- func CopyGRPCHeadersHTTPClientInterceptor(deps copyHeadersDeps) client.HTTPClientInterceptor
- func DumpRESTClientInterceptor(deps dumpHTTPDeps) client.HTTPClientInterceptor
- func MonitorGRPCClientCallsInterceptor(deps monitorDeps) grpc.UnaryClientInterceptor
- func MonitorRESTClientCallsInterceptor(deps monitorDeps) client.HTTPClientInterceptor
Constants ¶
const ( ClientTimerMetric = "client_calls_duration" ClientTimerMetricDescription = "Monitor external HTTP client calls" TargetTag = "target" PathTag = "path" SuccessTag = "success" TypeTag = "ctype" TypeGRPC = "grpc" TypeREST = "rest" )
Names
Variables ¶
This section is empty.
Functions ¶
func CopyGRPCHeadersClientInterceptor ¶
func CopyGRPCHeadersClientInterceptor(deps copyHeadersDeps) grpc.UnaryClientInterceptor
CopyGRPCHeadersClientInterceptor copies filtered Headers found in the Incoming metadata.MD to the Outgoing one.
This is useful if you want to propagate them to the next service when using grpc Client ¶
For Example: "authorization" header containing user token
func CopyGRPCHeadersHTTPClientInterceptor ¶ added in v0.2.1
func CopyGRPCHeadersHTTPClientInterceptor(deps copyHeadersDeps) client.HTTPClientInterceptor
CopyGRPCHeadersHTTPClientInterceptor copies filtered Headers found in the Incoming metadata.MD to the Outgoing Request Headers.
This is useful if you want to propagate them to the next service when using `http.Client`
For Example: "authorization" header containing user token
func DumpRESTClientInterceptor ¶ added in v0.1.6
func DumpRESTClientInterceptor(deps dumpHTTPDeps) client.HTTPClientInterceptor
DumpRESTClientInterceptor usefull when you want to log what is actually sent to the external HTTP server and was returned.
func MonitorGRPCClientCallsInterceptor ¶ added in v1.0.11
func MonitorGRPCClientCallsInterceptor(deps monitorDeps) grpc.UnaryClientInterceptor
MonitorGRPCClientCallsInterceptor create a new GRPC Unary Client interceptor that monitor all external client calls
func MonitorRESTClientCallsInterceptor ¶ added in v1.0.11
func MonitorRESTClientCallsInterceptor(deps monitorDeps) client.HTTPClientInterceptor
MonitorRESTClientCallsInterceptor create a new REST Client interceptor that monitor all external client calls
Types ¶
This section is empty.