probing

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProbeRetried = errors.New("probe is retried")
	ErrOutOfRetries = errors.New("retry limit reached")
)

Functions

This section is empty.

Types

type Prober added in v0.3.0

type Prober interface {
	Probe(context.Context, server.Server, int, time.Duration) (any, error)
	HandleSuccess(any, server.Server) server.Server
	HandleRetry(server.Server) server.Server
	HandleFailure(server.Server) server.Server
}

type Service

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

func NewService

func NewService(
	servers repositories.ServerRepository,
	queue *ps.Service,
	logger *zerolog.Logger,
	opts ServiceOpts,
) *Service

func (*Service) Probe

func (s *Service) Probe(ctx context.Context, prb probe.Probe) error

func (*Service) Register added in v0.3.0

func (s *Service) Register(pg probe.Goal, prober Prober) error

type ServiceOpts added in v0.3.0

type ServiceOpts struct {
	MaxRetries   int
	ProbeTimeout time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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