ping

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MPL-2.0 Imports: 2 Imported by: 1

README

Ping

Middleware to add new URL path and send "pong" as response.

Usefull for checking the health of server.

Usage

Import

import "github.com/ngamux/middleware/ping"

Instance With Default Config

pingMiddleware := ping.New()

Instance With Custom Config

pingMiddleware := ping.New(ping.Config{
	Path: "/check",
})

Mount to Ngamux

mux := ngamux.New()
mux.Use(pingMiddleware)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config ...Config) func(next http.HandlerFunc) http.HandlerFunc

Types

type Config

type Config struct {
	Path string
}

Jump to

Keyboard shortcuts

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