reviveservers

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoResponse = Response{}

Functions

This section is empty.

Types

type Request

type Request struct {
	MinScope     time.Time
	MaxScope     time.Time
	MinCountdown time.Time
	MaxCountdown time.Time
	Deadline     time.Time
}

func NewRequest

func NewRequest(
	minScope time.Time,
	maxScope time.Time,
	minCountdown time.Time,
	maxCountdown time.Time,
	deadline time.Time,
) Request

type Response

type Response struct {
	Count int
}

type UseCase

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

func New

func New(
	serverRepo repositories.ServerRepository,
	probeRepo repositories.ProbeRepository,
	opts UseCaseOptions,
	metrics *metrics.Collector,
	logger *zerolog.Logger,
) UseCase

func (UseCase) Execute

func (uc UseCase) Execute(ctx context.Context, req Request) (Response, error)

type UseCaseOptions added in v0.14.0

type UseCaseOptions struct {
	MaxProbeRetries int
}

Jump to

Keyboard shortcuts

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