client

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

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