probe

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceID          string
	ServiceName        string
	ServiceDescription string

	URL    string
	Method string

	ExpectedStatus []int
	Interval       time.Duration
	Timeout        time.Duration
	Timezone       *time.Location

	NodeID      int64
	InstanceID  int64
	IDGenerator uptime.IDGenerator

	Client *http.Client
	Store  uptime.Store

	Logger uptime.Logger
}

type Probe

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

func New

func New(config Config) (*Probe, error)

func (*Probe) Check

func (p *Probe) Check(ctx context.Context) (Result, error)

func (*Probe) Close

func (p *Probe) Close() error

type Result

type Result struct {
	URL        string
	Method     string
	StatusCode int
	Up         bool
	CheckedAt  time.Time
	Duration   time.Duration
}

Jump to

Keyboard shortcuts

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