Skip to content

Latest commit

 

History

History

_example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Examples

Using net/http

Using http.DefaultServeMux:

Using your own http.ServeMux:

Use statsviz options API to serve Statsviz web UI on /foo/bar (instead of default /debug/statsviz) and send metrics with a frequency of 250ms (rather than 1s):

Serve the the web UI via https and Websocket via wss:

Wrap statsviz handlers behind a middleware (HTTP Basic Authentication for example):

Using various Go libraries

With gorilla/mux router:

Using valyala/fasthttp and soheilhy/cmux:

Using labstack/echo router:

With gin-gonic/gin web framework:

With go-chi/chi router:

With gofiber/fiber web framework:

With kataras/iris web framework: