Documentation ¶
Index ¶
- func LoggerConfig(prefix string)
- func MakeRequestTimeTracker(handler func(rw http.ResponseWriter, req *http.Request) error, ...) func(rw http.ResponseWriter, req *http.Request) error
- func SaveTimeDataBackend(backendTime time.Duration)
- func SaveTimeFullTrip(fullTime time.Duration)
- func SaveTimerDataGotFromCache(cacheTime time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerConfig ¶
func LoggerConfig(prefix string)
func MakeRequestTimeTracker ¶
func MakeRequestTimeTracker( handler func(rw http.ResponseWriter, req *http.Request) error, saver func(t time.Duration), saveOnError bool, ) func(rw http.ResponseWriter, req *http.Request) error
MakeRequestTimeTracker sticks functions to the request that is called while the request processes. Functions put some time points for calculating backend time and full-trip time.
func SaveTimeDataBackend ¶
SaveTimeDataBackend is used for saving backend to DB. Uses pointer for using in functions with `defer` prefix.
func SaveTimeFullTrip ¶
func SaveTimerDataGotFromCache ¶
SaveTimerDataGotFromCache uses a pointer at time for saving it to some DB if the response is got from cache. Pointer is used for saving calling in `defer` functions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.