aborted

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checks

type Checks struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Checks provides methods to query current checks that are aborted so they must not be started.

func New

func New(l log.Logger, addr string, retryer Retryer) (*Checks, error)

New return a new Checks structure that can be used to test if a concrete check has been aborted or not.

func (*Checks) IsAborted

func (c *Checks) IsAborted(ID string) (bool, error)

IsAborted returns true if the specified ID has been marked to be aborted.

type None

type None struct{}

None return always false when asked if a check is aborted.

func (*None) IsAborted

func (c *None) IsAborted(ID string) (bool, error)

IsAborted restruns always false.

type Retryer

type Retryer interface {
	WithRetries(op string, exec func() error) error
}

Retryer represents the functions used by the Checks struct for retrying http requests.

Jump to

Keyboard shortcuts

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