util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiError

type MultiError []error

func (MultiError) As

func (e MultiError) As(target interface{}) bool

As allows you to use `errors.As()` to set target to the first error within the multi error that matches the target type.

func (MultiError) Error

func (e MultiError) Error() string

func (MultiError) Is

func (e MultiError) Is(target error) bool

Is allows you to determine if a generic error is in fact a MultiError using `errors.Is()` It will also return true if any of the contained errors match target.

type OnPing

type OnPing func(ctx context.Context)

type TickerPinger

type TickerPinger interface {
	Start(ctx context.Context)
	Stop()
}

func NewIntervalTickerPinger

func NewIntervalTickerPinger(
	interval time.Duration,
	OnPing OnPing,
) TickerPinger

Jump to

Keyboard shortcuts

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