Documentation ¶
Index ¶
- func ContextMiddleware(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func LoggingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func NewMetricsInterceptor(requests *prometheus.CounterVec, latency *prometheus.HistogramVec) grpc.UnaryServerInterceptor
- type Cache
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextMiddleware ¶
func ContextMiddleware( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
func LoggingInterceptor ¶
func LoggingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func NewMetricsInterceptor ¶
func NewMetricsInterceptor( requests *prometheus.CounterVec, latency *prometheus.HistogramVec, ) grpc.UnaryServerInterceptor
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) InterceptorFunc ¶
func (c *Cache) InterceptorFunc() grpc.UnaryServerInterceptor
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(rps float64, burst int) *RateLimiter
func (*RateLimiter) InterceptorFunc ¶
func (r *RateLimiter) InterceptorFunc() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.