core_delay

package
v0.0.0-...-99e5d07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(w http.ResponseWriter, r *http.Request, error string, code int)

func HandleError

func HandleError(w http.ResponseWriter, err error, statusCode int) bool

HandleError checks if the error is not nil, writes it to the output with the specified status code, and returns true. If error is nil it returns false.

func JSONResponse

func JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})

func JSONResponseCode

func JSONResponseCode(w http.ResponseWriter, r *http.Request, result interface{}, responseCode int)

func Sleep

func Sleep(mean time.Duration, stdDev time.Duration)

Sleep generates a normally distributed random delay with given mean and stdDev and blocks for that duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL