From 5ff89046dcb17f8b769cf0e8a49a71e3d3a26a6f Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Fri, 3 May 2019 18:20:54 -0700 Subject: [PATCH] Added documentation as to how to handle a timeout on an API request. --- docs/leveraging-the-library.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/leveraging-the-library.md b/docs/leveraging-the-library.md index 464bddd..e13ca2c 100644 --- a/docs/leveraging-the-library.md +++ b/docs/leveraging-the-library.md @@ -57,4 +57,19 @@ updateJob := realis.NewUpdateJob(job) updateJob.InstanceCount(1) updateJob.Ram(128) msg, err := r.UpdateJob(updateJob, "") -``` \ No newline at end of file +``` + + +* Handling a timeout scenario: + +When sending an API call to Aurora, the call may timeout at the client side. +This means that the time limit has been reached while waiting for the scheduler +to reply. In such a case it is recommended that the timeout is increased through +the use of the `realis.TimeoutMS()` option. + +As these timeouts cannot be totally avoided, there exists a mechanism to mitigate such +scenarios. The `StartJobUpdate` and `CreateService` API will return an error that +implements the Timeout interface. + +An error can be checked to see if it is a Timeout error by using the `realis.IsTimeout()` +function. \ No newline at end of file