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 ¶
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 ¶
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 ¶
func MonitorGRPCClientCallsInterceptor(deps monitorDeps) grpc.UnaryClientInterceptor
MonitorGRPCClientCallsInterceptor create a new GRPC Unary Client interceptor that monitor all external client calls
func MonitorRESTClientCallsInterceptor ¶
func MonitorRESTClientCallsInterceptor(deps monitorDeps) client.HTTPClientInterceptor
MonitorRESTClientCallsInterceptor create a new REST Client interceptor that monitor all external client calls
Types ¶
This section is empty.