client

package
v2.0.0-...-571da87 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 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

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.

Jump to

Keyboard shortcuts

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