timer

package
v0.0.0-...-4c3a410 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDefault = Config{
	DisplaySeconds:      true,
	DisplayMilliseconds: false,
	Prefix:              "x-process-time",
}

ConfigDefault is the default configuration.

Functions

func New

func New(config ...Config) func(*fiber.Ctx) error

New creates a new instance of middleware handler.

Types

type Config

type Config struct {
	// DisplaySeconds indicates the process time in seconds.
	//
	// Optional. Default value true.
	DisplaySeconds bool

	// DisplayMilliseconds indicates the process time in milliseconds.
	//
	// Optional. Default value false.
	DisplayMilliseconds bool

	// Prefix indicates prefix for header name.
	//
	// Optional. Default value "X-Process-Time".
	Prefix string
}

Config defines the configuration for middleware.

Jump to

Keyboard shortcuts

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