Documentation ¶
Index ¶
- Constants
- Variables
- func LimitHandler(handler httprouter.Handle, lmt *limiter.Limiter) httprouter.Handle
- func NewServer(handler http.Handler, port int) *http_no.Server
- func SendNotifs(nc *nats.Conn, rdb *redis.Client) httprouter.Handle
- func SendRandNum(nc *nats.Conn) httprouter.Handle
- func SendTestRandNum(nc *nats.Conn) httprouter.Handle
- func SetVerbosity() httprouter.Handle
- func Verbosity() httprouter.Handle
- type Router
Constants ¶
View Source
const ( // HeaderContentType is the Content-Type header key. HeaderContentType = "Content-Type" // ContentTypeJSON is the application/json MIME type. ContentTypeJSON = "application/json" )
Variables ¶
View Source
var (
ErrRandNumNotFound = errors.New("timeout - random number not found")
)
Functions ¶
func LimitHandler ¶ added in v0.0.7
func LimitHandler(handler httprouter.Handle, lmt *limiter.Limiter) httprouter.Handle
func SendNotifs ¶ added in v0.0.7
func SendNotifs(nc *nats.Conn, rdb *redis.Client) httprouter.Handle
func SendRandNum ¶
func SendRandNum(nc *nats.Conn) httprouter.Handle
func SendTestRandNum ¶
func SendTestRandNum(nc *nats.Conn) httprouter.Handle
func SetVerbosity ¶ added in v0.0.7
func SetVerbosity() httprouter.Handle
SetVerbosity allows the user to remotely modify the verbosity of all log messages Expects a "v" parameter in the query string of a PUT request:
curl -X PUT http://host:port/api/v1/verbosity?v=debug
options are:
debug info warn error
func Verbosity ¶ added in v0.0.7
func Verbosity() httprouter.Handle
Types ¶
Click to show internal directories.
Click to hide internal directories.