Documentation ¶
Index ¶
- Constants
- func AddLogIDIfNotExists(ctx context.Context) context.Context
- func Gen() string
- func GetLogID(ctx context.Context) string
- func NewCtx() context.Context
- func SetLogID(ctx context.Context, logId string) context.Context
- func SetRequestID(ctx context.Context, req *http.Request) string
- type Info
Constants ¶
View Source
const (
// IPUnknown represents unknown IP address.
IPUnknown = "00000000000000000000000000000000"
)
Variables ¶
This section is empty.
Functions ¶
func AddLogIDIfNotExists ¶
AddLogIDIfNotExists checks log ID from ctx, if there is no log ID associated with it, it returns a new context with a new log ID.
Types ¶
Click to show internal directories.
Click to hide internal directories.