grpc

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusCode added in v0.13.0

func StatusCode(code int) codes.Code

StatusCode does a best effort mapping from HTTP Request Status code to GRPC Code.

func StatusText added in v0.7.2

func StatusText(code int) string

func WrapStatsHandler

func WrapStatsHandler(delegate stats.Handler, spanFromContext sdk.SpanFromContext) stats.Handler

WrapStatsHandler wraps an instrumented StatsHandler and returns a new one that records the request/response body and metadata.

func WrapUnaryClientInterceptor

func WrapUnaryClientInterceptor(delegateInterceptor grpc.UnaryClientInterceptor, spanFromContext sdk.SpanFromContext,
	spanAttributes map[string]string) grpc.UnaryClientInterceptor

WrapUnaryClientInterceptor returns an interceptor that records the request and response message's body and serialize it as JSON.

func WrapUnaryServerInterceptor

func WrapUnaryServerInterceptor(
	delegateInterceptor grpc.UnaryServerInterceptor,
	spanFromContext sdk.SpanFromContext,
	options *Options,
	spanAttributes map[string]string,
) grpc.UnaryServerInterceptor

WrapUnaryServerInterceptor returns an interceptor that records the request and response message's body and serialize it as JSON

Types

type Options

type Options struct {
	Filter filter.Filter
}

Options for gRPC instrumentation

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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