probes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrQueueIsEmpty = errors.New("queue is empty")
View Source
var ErrTargetHasExpired = errors.New("target item has expired")
View Source
var ErrTargetIsNotReady = errors.New("queue has waiting targets")
View Source
var NC = time.Time{} // no constraint

Functions

This section is empty.

Types

type Goal

type Goal int
const (
	GoalDetails Goal = iota
	GoalPort
)

func (Goal) String

func (goal Goal) String() string

type Repository

type Repository interface {
	Add(context.Context, Target) error
	AddBetween(context.Context, Target, time.Time, time.Time) error
	Pop(context.Context) (Target, error)
	PopAny(context.Context) (Target, error)
	PopMany(context.Context, int) ([]Target, int, error)
	Count(context.Context) (int, error)
}

type Target

type Target struct {
	// contains filtered or unexported fields
}
var Blank Target // nolint: gochecknoglobals

func New

func New(addr addr.Addr, port int, goal Goal) Target

func (*Target) GetAddr

func (t *Target) GetAddr() addr.Addr

func (*Target) GetDottedIP

func (t *Target) GetDottedIP() string

func (*Target) GetGoal

func (t *Target) GetGoal() Goal

func (*Target) GetPort

func (t *Target) GetPort() int

func (*Target) GetRetries

func (t *Target) GetRetries() int

func (*Target) IncRetries

func (t *Target) IncRetries(maxRetries int) (int, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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