interceptor

package
v0.0.0-...-128b944 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitBreaker

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

CircuitBreaker is a client interceptor which wraps around circuitbreaker.CircuitBreaker.

func NewCircuitBreaker

func NewCircuitBreaker(cb *circuitbreaker.CircuitBreaker, logger *logger.Logger) *CircuitBreaker

NewCircuitBreaker returns a new circuit breaker interceptor.

func (*CircuitBreaker) UnaryClient

func (c *CircuitBreaker) UnaryClient() grpc.UnaryClientInterceptor

UnaryClient returns a client interceptor function to implement circuit breaking on Unary RPC requests.

type Metric

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

Metric is a client interceptor which collects metric.

func NewMetric

func NewMetric(meter metric.Meter) *Metric

NewMetric returns a new metric interceptor.

func (*Metric) UnaryClient

func (m *Metric) UnaryClient() (grpc.UnaryClientInterceptor, error)

UnaryClient returns a client interceptor function to collect metrics on Unary RPC requests.

type Validator

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

Validator is a server interceptor which validates incoming RPC requests.

func NewValidator

func NewValidator(logger *logger.Logger) *Validator

NewValidator returns a new validation interceptor.

func (*Validator) Unary

Unary returns a server interceptor function to validate incoming Unary RPC requests.

Jump to

Keyboard shortcuts

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