Expand description
RedseatClient: authenticated requests to one server, with the server token
refreshed before it expires. Port of @redseat/api client.ts.
Structs§
- Client
Options - How to build a
RedseatClient. - Cloud
Token Source - Server tokens from the cloud, for a signed-in user.
- Event
Options - Options of
RedseatClient::subscribe_events. - Redseat
Client - Client of one Redseat server. Cheap to clone; clones share the token.
Constants§
- DEFAULT_
REFRESH_ THRESHOLD - Default margin before expiry at which the server token is refreshed (5 minutes).
Traits§
- Server
Token Source - Gives fresh tokens for a server.
CloudTokenSourceasks the cloud.
Type Aliases§
- Server
Event Stream - Typed server events. Each item is an event, or an error for an event that could not be read (the stream goes on) or for a broken connection (the stream ends).