Documentation ¶
Index ¶
- Constants
- func CreateLogger(cfg *Config, app, appID string) zerolog.Logger
- func GetLogger(cfg *Config, app, appID string) zerolog.Logger
- func HttpMiddleware(cfg *Config, app, appID string, next http.Handler) http.Handler
- func StartNew(from context.Context) (context.Context, context.CancelFunc)
- func StreamInterceptor(cfg *Config, app, appID string) grpc.StreamServerInterceptor
- func UnaryInterceptor(cfg *Config, app, appID string) grpc.UnaryServerInterceptor
- func WithBucket(ctx context.Context, bucket string) context.Context
- func WithFlow(ctx context.Context, f xctx.Flow) context.Context
- func WithMethod(ctx context.Context, method s3.Method) context.Context
- func WithObjName(ctx context.Context, objName string) context.Context
- func WithStorage(ctx context.Context, storage string) context.Context
- func WithTraceID(ctx context.Context, t string) context.Context
- func WithUser(ctx context.Context, u string) context.Context
- func WorkerMiddleware(cfg *Config, app, appID string) asynq.MiddlewareFunc
- type Config
- type Logger
- func (logger *Logger) Debug(args ...interface{})
- func (logger *Logger) Error(args ...interface{})
- func (logger *Logger) Fatal(args ...interface{})
- func (logger *Logger) Info(args ...interface{})
- func (logger *Logger) Printf(ctx context.Context, format string, v ...interface{})
- func (logger *Logger) Warn(args ...interface{})
Constants ¶
View Source
const ( Storage = "stor_name" Object = "obj_name" Bucket = "bucket" Method = "method" TraceID = "trace_id" )
Variables ¶
This section is empty.
Functions ¶
func HttpMiddleware ¶
func StreamInterceptor ¶
func StreamInterceptor(cfg *Config, app, appID string) grpc.StreamServerInterceptor
func UnaryInterceptor ¶
func UnaryInterceptor(cfg *Config, app, appID string) grpc.UnaryServerInterceptor
func WorkerMiddleware ¶
func WorkerMiddleware(cfg *Config, app, appID string) asynq.MiddlewareFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.