package poller
import "github.com/Azure/azure-sdk-for-go/sdk/internal/poller"
Index ¶
- Constants
- Variables
- func Failed(s string) bool
- func GetJSON(resp *http.Response) (map[string]any, error)
- func GetProvisioningState(resp *http.Response) (string, error)
- func GetResourceLocation(resp *http.Response) (string, error)
- func GetStatus(resp *http.Response) (string, error)
- func IsTerminalState(s string) bool
- func IsValidURL(s string) bool
- func StatusCodeValid(resp *http.Response) bool
- func Succeeded(s string) bool
Constants ¶
const ( StatusSucceeded = "Succeeded" StatusCanceled = "Canceled" StatusFailed = "Failed" StatusInProgress = "InProgress" )
the well-known set of LRO status/provisioning state values.
const ( StatusCancelled = "Cancelled" StatusCompleted = "Completed" )
these are non-conformant states that we've seen in the wild. we support them for back-compat.
Variables ¶
ErrNoBody is returned if the response didn't contain a body.
Functions ¶
func Failed ¶
Failed returns true if the LRO's state is terminal failure.
func GetJSON ¶
GetJSON reads the response body into a raw JSON object. It returns ErrNoBody if there was no content.
func GetProvisioningState ¶
GetProvisioningState returns the LRO's state from the response body. If there is no state in the response body the empty string is returned.
func GetResourceLocation ¶
GetResourceLocation returns the LRO's resourceLocation value from the response body. Typically used for Operation-Location flows. If there is no resourceLocation in the response body the empty string is returned.
func GetStatus ¶
GetStatus returns the LRO's status from the response body. Typically used for Azure-AsyncOperation flows. If there is no status in the response body the empty string is returned.
func IsTerminalState ¶
IsTerminalState returns true if the LRO's state is terminal.
func IsValidURL ¶
IsValidURL verifies that the URL is valid and absolute.
func StatusCodeValid ¶
returns true if the LRO response contains a valid HTTP status code
func Succeeded ¶
Succeeded returns true if the LRO's state is terminal success.
Source Files ¶
- Version
- v1.11.1 (latest)
- Published
- Apr 7, 2025
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 8 minutes ago –
Tools for package owners.