* Overhauled error handling. Backoff now recognizes temporary errors and continues to retry if it finds one.

* Changed thrift function call wrapper to be more explicitly named and to perform more safety checks.

* Moved Jitter function from realis to retry.

* API code is now more uniform and follows a certain template.

* Lock added whenever a thrift call is made or when a modification is done to the connection. Note that calling ReestablishConn externally may result in some race conditions. We will move to make this function private in the near future.
This commit is contained in:
Renan DelValle 2018-01-17 15:40:10 -08:00
parent 145de5898e
commit c814ba26e9
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
4 changed files with 192 additions and 228 deletions

View file

@ -73,7 +73,7 @@ func TestRealisClient_ReestablishConn(t *testing.T) {
}
func TestGetCacerts(t *testing.T) {
certs, err := realis.Getcerts("./examples/certs")
certs, err := realis.GetCerts("./examples/certs")
assert.NoError(t, err)
assert.Equal(t, len(certs.Subjects()), 2)