interceptors

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 22 Imported by: 1

README

interceptors

import "github.com/carousell/Orion/interceptors"

Overview

Imported Packages

Index

Package files

documentations.go interceptors.go options.go

Variables

var (
    //FilterMethods is the list of methods that are filtered by default
    FilterMethods = []string{"Healthcheck"}
)

func DebugLoggingInterceptor

func DebugLoggingInterceptor() grpc.UnaryServerInterceptor

DebugLoggingInterceptor is the interceptor that logs all request/response from a handler

func DefaultClientInterceptor

func DefaultClientInterceptor(address string) grpc.UnaryClientInterceptor

DefaultClientInterceptor are the set of default interceptors that should be applied to all client calls

func DefaultClientInterceptors

func DefaultClientInterceptors(address string) []grpc.UnaryClientInterceptor

DefaultClientInterceptors are the set of default interceptors that should be applied to all client calls

func DefaultInterceptors

func DefaultInterceptors() []grpc.UnaryServerInterceptor

DefaultInterceptors are the set of default interceptors that are applied to all Orion methods

func DefaultStreamInterceptors

func DefaultStreamInterceptors() []grpc.StreamServerInterceptor

DefaultStreamInterceptors are the set of default interceptors that should be applied to all Orion streams

func GRPCClientInterceptor

func GRPCClientInterceptor() grpc.UnaryClientInterceptor

GRPCClientInterceptor is the interceptor that intercepts all cleint requests and adds tracing info to them

func HystrixClientInterceptor

func HystrixClientInterceptor() grpc.UnaryClientInterceptor

HystrixClientInterceptor is the interceptor that intercepts all cleint requests and adds hystrix info to them

func NewRelicClientInterceptor

func NewRelicClientInterceptor(address string) grpc.UnaryClientInterceptor

NewRelicClientInterceptor intercepts all client actions and reports them to newrelic

func NewRelicInterceptor

func NewRelicInterceptor() grpc.UnaryServerInterceptor

NewRelicInterceptor intercepts all server actions and reports them to newrelic

func PanicRecoveryInterceptor

func PanicRecoveryInterceptor() grpc.UnaryServerInterceptor

func ResponseTimeLoggingInterceptor

func ResponseTimeLoggingInterceptor() grpc.UnaryServerInterceptor

ResponseTimeLoggingInterceptor logs response time for each request on server

func ResponseTimeLoggingStreamInterceptor

func ResponseTimeLoggingStreamInterceptor() grpc.StreamServerInterceptor

ResponseTimeLoggingStreamInterceptor logs response time for stream RPCs.

func ServerErrorInterceptor

func ServerErrorInterceptor() grpc.UnaryServerInterceptor

ServerErrorInterceptor intercepts all server actions and reports them to error notifier

func ServerErrorStreamInterceptor

func ServerErrorStreamInterceptor() grpc.StreamServerInterceptor

ServerErrorStreamInterceptor intercepts server errors for stream RPCs and reports them to the error notifier.

func WithHystrixName

func WithHystrixName(name string) clientOption

WithHystrixName changes the hystrix name to be used in the client interceptors


Generated by godoc2ghmd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//FilterMethods is the list of methods that are filtered by default
	FilterMethods = []string{"Healthcheck", "HealthCheck"}
)

Functions

func DebugLoggingInterceptor

func DebugLoggingInterceptor() grpc.UnaryServerInterceptor

DebugLoggingInterceptor is the interceptor that logs all request/response from a handler

func DefaultClientInterceptor

func DefaultClientInterceptor(address string) grpc.UnaryClientInterceptor

DefaultClientInterceptor are the set of default interceptors that should be applied to all client calls

func DefaultClientInterceptors

func DefaultClientInterceptors(address string) []grpc.UnaryClientInterceptor

DefaultClientInterceptors are the set of default interceptors that should be applied to all client calls

func DefaultInterceptors

func DefaultInterceptors() []grpc.UnaryServerInterceptor

DefaultInterceptors are the set of default interceptors that are applied to all Orion methods

func DefaultStreamClientInterceptor

func DefaultStreamClientInterceptor() grpc.StreamClientInterceptor

DefaultStreamClientInterceptor are the set of default interceptors that should be applied to all client calls

func DefaultStreamClientInterceptors

func DefaultStreamClientInterceptors() []grpc.StreamClientInterceptor

DefaultStreamClientInterceptors are the set of default interceptors that should be applied to all client streaming calls

func DefaultStreamInterceptors

func DefaultStreamInterceptors() []grpc.StreamServerInterceptor

DefaultStreamInterceptors are the set of default interceptors that should be applied to all Orion streams

func ForwardMetadataInterceptor

func ForwardMetadataInterceptor() grpc.UnaryClientInterceptor

ForwardMetadataInterceptor forwards metadata from upstream to downstream

func ForwardMetadataStreamClientInterceptor

func ForwardMetadataStreamClientInterceptor() grpc.StreamClientInterceptor

ForwardMetadataInterceptor forwards metadata from upstream to downstream

func GRPCClientInterceptor

func GRPCClientInterceptor() grpc.UnaryClientInterceptor

GRPCClientInterceptor is the interceptor that intercepts all cleint requests and adds tracing info to them

func HystrixClientInterceptor

func HystrixClientInterceptor() grpc.UnaryClientInterceptor

HystrixClientInterceptor is the interceptor that intercepts all cleint requests and adds hystrix info to them

func NewRelicClientInterceptor

func NewRelicClientInterceptor(address string) grpc.UnaryClientInterceptor

NewRelicClientInterceptor intercepts all client actions and reports them to newrelic

func NewRelicInterceptor

func NewRelicInterceptor() grpc.UnaryServerInterceptor

NewRelicInterceptor intercepts all server actions and reports them to newrelic

func PanicRecoveryInterceptor

func PanicRecoveryInterceptor() grpc.UnaryServerInterceptor

func ResponseTimeLoggingInterceptor

func ResponseTimeLoggingInterceptor() grpc.UnaryServerInterceptor

ResponseTimeLoggingInterceptor logs response time for each request on server

func ResponseTimeLoggingStreamInterceptor

func ResponseTimeLoggingStreamInterceptor() grpc.StreamServerInterceptor

ResponseTimeLoggingStreamInterceptor logs response time for stream RPCs.

func ServerErrorInterceptor

func ServerErrorInterceptor() grpc.UnaryServerInterceptor

ServerErrorInterceptor intercepts all server actions and reports them to error notifier

func ServerErrorStreamInterceptor

func ServerErrorStreamInterceptor() grpc.StreamServerInterceptor

ServerErrorStreamInterceptor intercepts server errors for stream RPCs and reports them to the error notifier.

func WithHystrixFallbackFunc

func WithHystrixFallbackFunc(f func(error) error) hystrixOption

func WithHystrixIgnorableErrors

func WithHystrixIgnorableErrors(e ...error) hystrixOption

func WithHystrixIgnorableGRPCCodes

func WithHystrixIgnorableGRPCCodes(c ...codes.Code) hystrixOption

func WithHystrixName

func WithHystrixName(name string) hystrixOption

WithHystrixName changes the hystrix name to be used in the client interceptors

Types

This section is empty.

Jump to

Keyboard shortcuts

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