Implement an offline mode for a distributed node (#4646)

Implement an offline mode for remote storage to cache the
offline status of a node in order to prevent network calls
that are bound to fail. After a time interval an attempt
will be made to restore the connection and mark the node
as online if successful.

Fixes #4183
This commit is contained in:
Frank Wessels
2017-08-11 11:38:46 -07:00
committed by Harshavardhana
parent 1978b9d8f9
commit 98b62cbec8
6 changed files with 227 additions and 125 deletions

View File

@@ -127,11 +127,11 @@ func TestStorageErr(t *testing.T) {
err: fmt.Errorf("%s", io.ErrUnexpectedEOF.Error()),
},
{
expectedErr: errDiskNotFound,
expectedErr: errDiskNotFoundFromNetError,
err: &net.OpError{},
},
{
expectedErr: errDiskNotFound,
expectedErr: errDiskNotFoundFromRPCShutdown,
err: rpc.ErrShutdown,
},
{