Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndTimeFrom ¶
EndTimeFrom returns the value of the excution info key on the ctx
func WithEndTime ¶
WithEndTime returns a copy of parent in which the end time value is set
func WithRequestInfo ¶
func WithRequestInfo(parent context.Context, requestInfo RequestInfo) context.Context
WithRequestInfo returns a copy of parent in which the request info value is set
Types ¶
type RequestInfo ¶
type RequestInfo struct { ServiceLabel string Method string Component string IP string URLParam string BodyParam string StartTimeStamp int64 }
RequestInfo holds service information from http.Request
func GetRequestInfo ¶
func GetRequestInfo(r *http.Request) RequestInfo
GetRequestInfo returns request info needed from http.Request
func RequestInfoFrom ¶
func RequestInfoFrom(ctx context.Context) (RequestInfo, bool)
RequestInfoFrom returns the value of the request info key on the ctx
func (*RequestInfo) String ¶
func (info *RequestInfo) String() string
Click to show internal directories.
Click to hide internal directories.