utils

package
v0.0.0-...-77861b7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func CheckErrf

func CheckErrf(err error, msg string, args ...interface{})

func Poll

func Poll[T any](run func() (result *T, stop bool), opts ...*PollOpts) (*T, error)

Types

type PollOpts

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

func WithInterval

func WithInterval(interval time.Duration) *PollOpts

func WithMaxRetry

func WithMaxRetry(maxRetry int) *PollOpts

func WithMessage

func WithMessage(msg string, args ...interface{}) *PollOpts

func WithTimeout

func WithTimeout(timeout time.Duration) *PollOpts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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