Memco

Interface SessionOptions

What MemoryOperations.startSession and MemoryOperations.withSession take beyond the domain, and MemoryOperations.resumeSession beyond the session id.

interface SessionOptions {
    timeout?: number;
    externalId?: string;
    keyTtlMinutes?: number;
}

Hierarchy (View Summary)

Index
timeout?: number

Seconds to wait for this call. Defaults to the client's own timeout.

externalId?: string

Act as one of your own users, by your id for them, as created with UserOperations.create.

The client's credential mints a key acting as that user, and the session and every call through it — its tools, and the memories it returns, included — carry that key. It renews itself before it expires; a renewal that fails leaves the session on the key it has until that one expires. The session first lists the domains under the key, learning the limits and any deprecation notice as that user. Close the session when done, which ends the key. Omit it to open the session under the client's own credential.

keyTtlMinutes?: number

How many minutes each key acting as the externalId user lives.

Leave it out for the service's default. The session renews its key before it expires, so a short lifetime costs nothing while the session is in use, and limits how long a key nobody closed stays usable. The service owns the maximum and refuses a longer one. Without an externalId no key is minted and it is unused, but an invalid value is refused all the same.

On this page