ogrpc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: ISC Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerStreamWithContext

func ServerStreamWithContext(ctx context.Context, s grpc.ServerStream) grpc.ServerStream

ServerStreamWithContext returns a new grpc.ServerStream with a new context.

Types

type ClientInterceptor

type ClientInterceptor struct {
	// contains filtered or unexported fields
}

ClientInterceptor creates interceptors with logging, metrics, and tracing for grpc clients.

func NewClientInterceptor

func NewClientInterceptor(observer observer.Observer, opts Options) *ClientInterceptor

NewClientInterceptor creates a new server interceptor for observability.

func (*ClientInterceptor) DialOptions

func (i *ClientInterceptor) DialOptions() []grpc.DialOption

DialOptions return grpc dial options for unary and stream interceptors. This can be used for making gRPC method calls observable via logging, metrics, tracing, etc.

type Options

type Options struct {
	ExcludedMethods []string
}

Options are optional configurations for interceptors.

type ServerInterceptor

type ServerInterceptor struct {
	// contains filtered or unexported fields
}

ServerInterceptor creates interceptors with logging, metrics, and tracing for grpc servers.

func NewServerInterceptor

func NewServerInterceptor(observer observer.Observer, opts Options) *ServerInterceptor

NewServerInterceptor creates a new server interceptor for observability.

func (*ServerInterceptor) ServerOptions

func (i *ServerInterceptor) ServerOptions() []grpc.ServerOption

ServerOptions return grpc server options for unary and stream interceptors. This can be used for making gRPC method handlers observable via logging, metrics, tracing, etc. It also observes and recovers panics that happened inside the method handlers.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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