history

package
v0.0.0-...-53c35de Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package history stores check results and provides a web interface to view them

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	// contains filtered or unexported fields
}

History stores check results and provides a web interface to view them. Similar to the web ui provided by the prometheus blackbox exporter.

func New

func New(maxCount int) (*History, error)

New creates a new History instance

func (*History) Append

func (h *History) Append(r checker.CheckResult)

Append adds a new check result to the history

func (*History) ShowDetail

func (h *History) ShowDetail(w http.ResponseWriter, r *http.Request)

ShowDetail displays the details of a single check result in a web browser

func (*History) ShowList

func (h *History) ShowList(w http.ResponseWriter, r *http.Request)

ShowList displays the list of check results in a web browser

func (*History) Trim

func (h *History) Trim()

Trim removes the oldest check results if the history is longer than maxCount

Jump to

Keyboard shortcuts

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