example

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: MIT Imports: 3 Imported by: 2

README

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 statviz 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:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Work

func Work()

Work loops forever, generating a bunch of allocations of various sizes in order to force the garbage collector to work.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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