Struct: request.Waiter
Overview
A Waiter provides the functionality to perform a blocking call which will wait for a resource state to be satisfied by a service.
This type should not be used directly. The API operations provided in the service packages prefixed with “WaitUntil” should be used instead.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom
Structure Field Summary collapse
- Acceptors []WaiterAcceptor
- Delay WaiterDelay
- Logger aws.Logger
- MaxAttempts int
- Name string
- RequestOptions []Option
Method Summary collapse
-
func (w *Waiter) ApplyOptions(opts ...WaiterOption)
ApplyOptions updates the waiter with the list of waiter options provided.
-
func (w Waiter) WaitWithContext(ctx aws.Context) error
WaitWithContext will make requests for the API operation using NewRequest to build API requests.
Structure Field Details
Acceptors []WaiterAcceptor
Delay WaiterDelay
Logger aws.Logger
MaxAttempts int
Name string
RequestOptions []Option
Method Details
func (w *Waiter) ApplyOptions(opts ...WaiterOption)
ApplyOptions updates the waiter with the list of waiter options provided.
87 88 89 90 91 |
// File 'aws/request/waiter.go', line 87
|
func (w Waiter) WaitWithContext(ctx aws.Context) error
WaitWithContext will make requests for the API operation using NewRequest to build API requests. The request's response will be compared against the Waiter's Acceptors to determine the successful state of the resource the waiter is inspecting.
The passed in context must not be nil. If it is nil a panic will occur. The Context will be used to cancel the waiter's pending requests and retry delays. Use aws.BackgroundContext if no context is available.
The waiter will continue until the target state defined by the Acceptors, or the max attempts expires.
Will return the WaiterResourceNotReadyErrorCode error code if the waiter's retryer ShouldRetry returns false. This normally will happen when the max wait attempts expires.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
// File 'aws/request/waiter.go', line 168
|