Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeDelay ¶
func ComputeDelay(attempt int64, minDelay, maxDelay, remainingTime time.Duration) (delay time.Duration, err error)
ComputeDelay computes delay between waiter attempts. The function takes in a current attempt count, minimum delay, maximum delay, and remaining wait time for waiter as input. The inputs minDelay and maxDelay must always be greater than 0, along with minDelay lesser than or equal to maxDelay.
Returns the computed delay and if next attempt count is possible within the given input time constraints. Note that the zeroth attempt results in no delay.
Types ¶
type Logger ¶
type Logger struct { // Attempt is the current attempt to be logged Attempt int64 }
Logger is the Logger middleware used by the waiter to log an attempt
func (Logger) AddLogger ¶
func (m Logger) AddLogger(stack *middleware.Stack) error
AddLogger is a helper util to add waiter logger after `SetLogger` middleware in
func (*Logger) HandleInitialize ¶
func (m *Logger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, )
HandleInitialize performs handling of request in initialize stack step