Documentation ¶
Overview ¶
Package poller implements a poller that can be used to wait for a condition to be met. The poller is designed to be a replacement for the azure-sdk-for-go poller with exponential backoff and an injectable clock. reference: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore@v1.1.1/runtime#Poller .
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PollUntilDoneOptions ¶
type PollUntilDoneOptions struct { StartingBackoff time.Duration MaxBackoff time.Duration clock.Clock }
PollUntilDoneOptions provides options for the Poller. Used to specify backoff and clock options.
func NewPollUntilDoneOptions ¶
func NewPollUntilDoneOptions() *PollUntilDoneOptions
NewPollUntilDoneOptions creates a new PollUntilDoneOptions with the default values and a real clock.
type Poller ¶
type Poller[T any] struct { // contains filtered or unexported fields }
Poller is a poller that can be used to wait for a condition to be met. The poller is designed to be a replacement for the azure-sdk-for-go poller with exponential backoff and an injectable clock. reference: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore@v1.1.1/runtime#Poller .
func (*Poller[T]) PollUntilDone ¶
func (p *Poller[T]) PollUntilDone(ctx context.Context, options *PollUntilDoneOptions) (T, error)
PollUntilDone polls the handler until the condition is met or the context is cancelled.