Versions in this module Expand all Collapse all v0 v0.0.2 Nov 2, 2023 v0.0.1 Nov 2, 2023 Changes in this version + var ContextRequestIDKey = "request_id" + var ErrLimitExceed = rl.ErrLimitExceed + var ErrNotAllowed = circuitbreaker.ErrNotAllowed + var RequestIDKey = CtxKeyString(ContextRequestIDKey) + func ClientCtxRequestID(ctx context.Context) string + func ClientCtxRequestIDField(ctx context.Context) zap.Field + func ClientTokenOption(appID string, appKey string, isSecure bool) grpc.DialOption + func CtxRequestIDField(ctx context.Context) zap.Field + func GetAuthCtxKey() string + func GetAuthorization(token string) string + func JwtVerify(ctx context.Context) (context.Context, error) + func ServerCtxRequestID(ctx context.Context) string + func ServerCtxRequestIDField(ctx context.Context) zap.Field + func SetContextRequestIDKey(key string) + func SetJwtTokenToCtx(ctx context.Context, authorization string) context.Context + func StreamClientCircuitBreaker(opts ...CircuitBreakerOption) grpc.StreamClientInterceptor + func StreamClientLog(logger *zap.Logger, opts ...LogOption) grpc.StreamClientInterceptor + func StreamClientMetrics() grpc.StreamClientInterceptor + func StreamClientRecovery() grpc.StreamClientInterceptor + func StreamClientRequestID() grpc.StreamClientInterceptor + func StreamClientRetry(opts ...RetryOption) grpc.StreamClientInterceptor + func StreamClientTimeout(d time.Duration) grpc.StreamClientInterceptor + func StreamClientTracing() grpc.StreamClientInterceptor + func StreamServerCircuitBreaker(opts ...CircuitBreakerOption) grpc.StreamServerInterceptor + func StreamServerJwtAuth(opts ...AuthOption) grpc.StreamServerInterceptor + func StreamServerLog(logger *zap.Logger, opts ...LogOption) grpc.StreamServerInterceptor + func StreamServerMetrics(opts ...metrics.Option) grpc.StreamServerInterceptor + func StreamServerRateLimit(opts ...RatelimitOption) grpc.StreamServerInterceptor + func StreamServerRecovery() grpc.StreamServerInterceptor + func StreamServerRequestID() grpc.StreamServerInterceptor + func StreamServerToken(f CheckToken) grpc.StreamServerInterceptor + func StreamServerTracing() grpc.StreamServerInterceptor + func UnaryClientCircuitBreaker(opts ...CircuitBreakerOption) grpc.UnaryClientInterceptor + func UnaryClientLog(logger *zap.Logger, opts ...LogOption) grpc.UnaryClientInterceptor + func UnaryClientMetrics() grpc.UnaryClientInterceptor + func UnaryClientRecovery() grpc.UnaryClientInterceptor + func UnaryClientRequestID() grpc.UnaryClientInterceptor + func UnaryClientRetry(opts ...RetryOption) grpc.UnaryClientInterceptor + func UnaryClientTimeout(d time.Duration) grpc.UnaryClientInterceptor + func UnaryClientTracing() grpc.UnaryClientInterceptor + func UnaryServerCircuitBreaker(opts ...CircuitBreakerOption) grpc.UnaryServerInterceptor + func UnaryServerJwtAuth(opts ...AuthOption) grpc.UnaryServerInterceptor + func UnaryServerLog(logger *zap.Logger, opts ...LogOption) grpc.UnaryServerInterceptor + func UnaryServerMetrics(opts ...metrics.Option) grpc.UnaryServerInterceptor + func UnaryServerRateLimit(opts ...RatelimitOption) grpc.UnaryServerInterceptor + func UnaryServerRecovery() grpc.UnaryServerInterceptor + func UnaryServerRequestID() grpc.UnaryServerInterceptor + func UnaryServerToken(f CheckToken) grpc.UnaryServerInterceptor + func UnaryServerTracing() grpc.UnaryServerInterceptor + type AuthOption func(*AuthOptions) + func WithAuthClaimsName(claimsName string) AuthOption + func WithAuthIgnoreMethods(fullMethodNames ...string) AuthOption + func WithAuthScheme(scheme string) AuthOption + type AuthOptions struct + type CheckToken func(appID string, appKey string) error + type CircuitBreakerOption func(*circuitBreakerOptions) + func WithGroup(g *group.Group) CircuitBreakerOption + func WithValidCode(code ...codes.Code) CircuitBreakerOption + type CtxKeyString string + type LogOption func(*logOptions) + func WithLogFields(kvs map[string]interface{}) LogOption + func WithLogIgnoreMethods(fullMethodNames ...string) LogOption + func WithReplaceGRPCLogger() LogOption + type RatelimitOption func(*ratelimitOptions) + func WithBucket(b int) RatelimitOption + func WithCPUQuota(quota float64) RatelimitOption + func WithCPUThreshold(threshold int64) RatelimitOption + func WithWindow(d time.Duration) RatelimitOption + type RetryOption func(*retryOptions) + func WithRetryErrCodes(errCodes ...codes.Code) RetryOption + func WithRetryInterval(t time.Duration) RetryOption + func WithRetryTimes(n uint) RetryOption