monitor

package
v2.52.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 12 Imported by: 165

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDefault = Config{
	Title:      defaultTitle,
	Refresh:    defaultRefresh,
	FontURL:    defaultFontURL,
	ChartJsURL: defaultChartJSURL,
	CustomHead: defaultCustomHead,
	APIOnly:    false,
	Next:       nil,
	// contains filtered or unexported fields
}

Functions

func New

func New(config ...Config) fiber.Handler

New creates a new middleware handler

Types

type Config added in v2.19.0

type Config struct {
	// Metrics page title
	//
	// Optional. Default: "Fiber Monitor"
	Title string

	// Refresh period
	//
	// Optional. Default: 3 seconds
	Refresh time.Duration

	// Whether the service should expose only the monitoring API.
	//
	// Optional. Default: false
	APIOnly bool

	// Next defines a function to skip this middleware when returned true.
	//
	// Optional. Default: nil
	Next func(c *fiber.Ctx) bool

	// Custom HTML Code to Head Section(Before End)
	//
	// Optional. Default: empty
	CustomHead string

	// FontURL for specify font resource path or URL . also you can use relative path
	//
	// Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap
	FontURL string

	// ChartJsURL for specify ChartJS library  path or URL . also you can use relative path
	//
	// Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js
	ChartJsURL string // TODO: Rename to "ChartJSURL" in v3
	// contains filtered or unexported fields
}

Config defines the config for middleware.

Jump to

Keyboard shortcuts

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