wait

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(f WaitFn) *Handler

New creates a new Wait instance

func (*Handler) SetThrottle

func (w *Handler) SetThrottle(d time.Duration) *Handler

SetThrottle sets the duration between func triggering

func (*Handler) SetTimeout

func (w *Handler) SetTimeout(d time.Duration) *Handler

SetTimeout sets the duration for wait timeout

func (*Handler) Wait

func (w *Handler) Wait() (res interface{}, err error)

Do starts the wait until there's an error or wait is done

type WaitFn

type WaitFn func() (res interface{}, done bool, err error)

Jump to

Keyboard shortcuts

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