healthcheck

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProbeName = "sql"

DefaultProbeName is the name of the SQL probe.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLProbe

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

SQLProbe is a probe compatible with the healthcheck module.

func NewSQLProbe

func NewSQLProbe(db *sql.DB) *SQLProbe

NewSQLProbe returns a new SQLProbe.

func (*SQLProbe) Check

Check returns a successful healthcheck.CheckerProbeResult if the database connection can be pinged.

func (*SQLProbe) Name

func (p *SQLProbe) Name() string

Name returns the name of the SQLProbe.

func (*SQLProbe) SetName

func (p *SQLProbe) SetName(name string) *SQLProbe

SetName sets the name of the SQLProbe.

Jump to

Keyboard shortcuts

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