Documentation ¶
Index ¶
- Constants
- type BaseClient
- type LongRunningOperationPollResult
- type PollClient
- func (client PollClient) Get(ctx context.Context, pollURL string) (result PollResponse, err error)
- func (client PollClient) GetPreparer(ctx context.Context, pollURL string) (*http.Request, error)
- func (client PollClient) GetResponder(resp *http.Response) (result PollResponse, err error)
- func (client PollClient) GetSender(req *http.Request) (*http.Response, error)
- func (client PollClient) PollLongRunningOperationIfNeeded(ctx context.Context, status *v1beta1.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
- func (client PollClient) PollLongRunningOperationIfNeededV1Alpha1(ctx context.Context, status *v1alpha1.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
- func (client PollClient) PollLongRunningOperationIfNeededV1Alpha2(ctx context.Context, status *v1alpha2.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
- type PollResponse
Constants ¶
const ( LongRunningOperationPollStatusFailed = "Failed" LongRunningOperationPollStatusSucceeded = "Succeeded" LongRunningOperationPollStatusCancelled = "Cancelled" )
const ( PollResultNoPollingNeeded = LongRunningOperationPollResult("noPollingNeeded") PollResultCompletedSuccessfully = LongRunningOperationPollResult("completedSuccessfully") PollResultTryAgainLater = LongRunningOperationPollResult("tryAgainLater") PollResultBadRequest = LongRunningOperationPollResult("badRequest") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
BaseClient was modeled off some of the other Baseclients in the go sdk and contains an autorest client
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client.
type LongRunningOperationPollResult ¶
type LongRunningOperationPollResult string
type PollClient ¶
type PollClient struct {
BaseClient
}
PollClient inherits from the autorest client and has the methods needed to handle GETs to the polling url
func NewPollClient ¶
func NewPollClient(creds config.Credentials) PollClient
NewPollClient returns a client using hte env values from config
func NewPollClientWithBaseURI ¶
func NewPollClientWithBaseURI(baseURI string, creds config.Credentials) PollClient
NewPollClientWithBaseURI returns a paramterized client
func (PollClient) Get ¶
func (client PollClient) Get(ctx context.Context, pollURL string) (result PollResponse, err error)
Get takes a context and a polling url and performs a Get request on the url
func (PollClient) GetPreparer ¶
GetPreparer prepares the Get request.
func (PollClient) GetResponder ¶
func (client PollClient) GetResponder(resp *http.Response) (result PollResponse, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (PollClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (PollClient) PollLongRunningOperationIfNeeded ¶
func (client PollClient) PollLongRunningOperationIfNeeded(ctx context.Context, status *v1beta1.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
func (PollClient) PollLongRunningOperationIfNeededV1Alpha1 ¶
func (client PollClient) PollLongRunningOperationIfNeededV1Alpha1(ctx context.Context, status *v1alpha1.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
func (PollClient) PollLongRunningOperationIfNeededV1Alpha2 ¶
func (client PollClient) PollLongRunningOperationIfNeededV1Alpha2(ctx context.Context, status *v1alpha2.ASOStatus, kind api.PollingURLKind) (LongRunningOperationPollResult, error)
type PollResponse ¶
type PollResponse struct { autorest.Response `json:"-"` Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` Error azure.ServiceError `json:"error,omitempty"` }
PollResponse models the expected response from the poll url