Documentation ¶
Index ¶
- func AttachServerNameInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func InterceptorLogger(l *zerolog.Logger) logging.Logger
- func ServerNameStreamingInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- type ErrorInterceptor
- type GRPCAuthN
- type HatchetApiTokenRateLimiter
- type HatchetRateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachServerNameInterceptor ¶ added in v0.51.0
func AttachServerNameInterceptor( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
func InterceptorLogger ¶ added in v0.17.0
InterceptorLogger adapts zerolog logger to interceptor logger. This code is simple enough to be copied and not imported.
func ServerNameStreamingInterceptor ¶ added in v0.51.0
func ServerNameStreamingInterceptor( srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler, ) error
Types ¶
type ErrorInterceptor ¶ added in v0.20.0
type ErrorInterceptor struct {
// contains filtered or unexported fields
}
func NewErrorInterceptor ¶ added in v0.20.0
func NewErrorInterceptor(a errors.Alerter, l *zerolog.Logger) *ErrorInterceptor
func (*ErrorInterceptor) ErrorStreamServerInterceptor ¶ added in v0.20.0
func (e *ErrorInterceptor) ErrorStreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for panic recovery.
func (*ErrorInterceptor) ErrorUnaryServerInterceptor ¶ added in v0.20.0
func (e *ErrorInterceptor) ErrorUnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for panic recovery.
type GRPCAuthN ¶
type GRPCAuthN struct {
// contains filtered or unexported fields
}
func NewAuthN ¶
func NewAuthN(config *server.ServerConfig) *GRPCAuthN
type HatchetApiTokenRateLimiter ¶ added in v0.51.0
type HatchetApiTokenRateLimiter struct {
// contains filtered or unexported fields
}
type HatchetRateLimiter ¶ added in v0.51.0
type HatchetRateLimiter struct {
// contains filtered or unexported fields
}
func NewHatchetRateLimiter ¶ added in v0.51.0
func (*HatchetRateLimiter) GetOrCreateTenantRateLimiter ¶ added in v0.51.0
func (rl *HatchetRateLimiter) GetOrCreateTenantRateLimiter(rateLimitToken string) *HatchetApiTokenRateLimiter
Click to show internal directories.
Click to hide internal directories.