Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Create a StorageService class that can look up default tokens #11

Closed
fmitchell-r7 opened this issue Apr 4, 2016 · 1 comment
Closed

Comments

@fmitchell-r7
Copy link
Contributor

The StorageService class (see #10) needs to be initialized with a default instance of LeaseManager (see #4) backed by a TokenProvider (see #3). When the lookup() method is called with /v1/token/default as the secret argument, the result of calling LeaseManager#data should be returned.

If the Lease Manager is not in a READY state, the callback argument to lookup() should be queued. Once the Lease Manager becomes ready, the callback should be triggered with a result argument. If the Lease Manager fails to become ready within N seconds (TBD what N is) the callback should be triggered with an error argument.

The result argument should be the data property from the Lease Manager. The error argument should be an Error with an appropriate message.

Multiple calls to lookup() for the default token should queue all given callbacks. If the same callback is provided more than once, it should trigger as many times as provided.

@dgreene-r7
Copy link
Contributor

Not sure why github didn't pick up the 'close' keyword in #25 but this has been resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants