pollers

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAzureAsync = "Azure-AsyncOperation"
	HeaderLocation   = "Location"
)
View Source
const (
	StatusSucceeded  = "Succeeded"
	StatusCanceled   = "Canceled"
	StatusFailed     = "Failed"
	StatusInProgress = "InProgress"
)

Variables

View Source
var ErrNoBody = errors.New("the response did not contain a body")

ErrNoBody is returned if the response didn't contain a body.

Functions

func DecodeID

func DecodeID(tk string) (string, string, error)

DecodeID decodes the poller ID, returning [pollerID, kind] or an error.

func Failed

func Failed(s string) bool

Failed returns true if the LRO's state is terminal failure.

func GetProvisioningState

func GetProvisioningState(resp *azcore.Response) (string, error)

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 GetStatus

func GetStatus(resp *azcore.Response) (string, error)

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

func IsTerminalState(s string) bool

IsTerminalState returns true if the LRO's state is terminal.

func IsValidURL

func IsValidURL(s string) bool

IsValidURL verifies that the URL is valid and absolute.

func MakeID

func MakeID(pollerID string, kind string) string

MakeID returns the poller ID from the provided values.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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