poll

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package poll is an opinionated library for polling in the Signadot CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poll added in v0.8.0

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

func NewPoll added in v0.8.0

func NewPoll() *Poll

func (*Poll) Until added in v0.8.0

func (p *Poll) Until(fn func() bool) error

Until polls until the given function returns true, or the timeout expires.

func (*Poll) UntilWithError added in v0.8.0

func (p *Poll) UntilWithError(fn func() (bool, error)) error

UntilWithError polls until the given function returns true, or the timeout expires. But also can return error so can be pass down to handle proper errors

func (*Poll) WithDelay added in v0.8.0

func (p *Poll) WithDelay(delay time.Duration) *Poll

func (*Poll) WithResetOnLoop added in v0.8.0

func (p *Poll) WithResetOnLoop(resetOnLoop bool) *Poll

func (*Poll) WithTimeout added in v0.8.0

func (p *Poll) WithTimeout(timeout time.Duration) *Poll

Jump to

Keyboard shortcuts

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