Skip to main content

Module client

Module client 

Source
Expand description

RedseatClient: authenticated requests to one server, with the server token refreshed before it expires. Port of @redseat/api client.ts.

Structs§

ClientOptions
How to build a RedseatClient.
CloudTokenSource
Server tokens from the cloud, for a signed-in user.
EventOptions
Options of RedseatClient::subscribe_events.
RedseatClient
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§

ServerTokenSource
Gives fresh tokens for a server. CloudTokenSource asks the cloud.

Type Aliases§

ServerEventStream
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).