Documentation ¶
Index ¶
- Constants
- Variables
- func GetRequestID(ctx context.Context) string
- func HandleRequestID(ctx context.Context) string
- func Logger() *logrus.Logger
- func SetRequestID(ctx context.Context, rid string) context.Context
- func Time(ctx context.Context) time.Time
- func TimeToFormat(t time.Time) string
- func UnaryErrorInterceptor() grpc.UnaryServerInterceptor
- func UnaryRequestIDInterceptor() grpc.UnaryServerInterceptor
- func UnaryTimerInterceptor() grpc.UnaryServerInterceptor
Constants ¶
View Source
const XRequestIDKey = "x-request-id"
XRequestIDKey リクエストID key
View Source
const (
YmdHis = "2006-01-02 15:04:05"
)
formats
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
errors
Functions ¶
func SetRequestID ¶
SetRequestID setter
func UnaryErrorInterceptor ¶
func UnaryErrorInterceptor() grpc.UnaryServerInterceptor
UnaryErrorInterceptor エラーインターセプター
func UnaryRequestIDInterceptor ¶
func UnaryRequestIDInterceptor() grpc.UnaryServerInterceptor
UnaryRequestIDInterceptor unary rpc 用のリクエストID interceptor
func UnaryTimerInterceptor ¶
func UnaryTimerInterceptor() grpc.UnaryServerInterceptor
UnaryTimerInterceptor timer
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.