nrgrpc

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(app newrelic.Application, optFuncs ...Option) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor to set newrelic transaction

func UnaryServerInterceptor

func UnaryServerInterceptor(app newrelic.Application, optFuncs ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor to set newrelic transaction

Types

type Option

type Option func(Options) Options

Option is a function for building configurations object for an interceptor

func WithIgnoredMethods

func WithIgnoredMethods(fullMethods ...string) Option

WithIgnoredMethods receives full method names to get newrelic to ignore them

func WithIgnoredServices

func WithIgnoredServices(services ...string) Option

WithIgnoredServices receives service names to get newrelic to ignore them

type Options

type Options struct {
	IgnoredServices map[string]struct{}
	IgnoredMethods  map[string]struct{}
}

Options contains some configurations for an interceptor

func (*Options) IsIgnored

func (o *Options) IsIgnored(fullMethod string) bool

IsIgnored returned true if the given method is ignored

Jump to

Keyboard shortcuts

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