Skip to Content

Interface TimeoutOptions

A deadline for one call, in seconds.

Seconds, not milliseconds. That is the unit a caller thinks in, and the conversion to the epoch deadline grpc-js wants happens where the call is built. Passing one replaces the client's own default for that call and changes nothing else; the default is DEFAULT_TIMEOUT seconds unless the client was constructed with another.

When the deadline elapses the call fails with a MemcoTimeoutError, and nothing is retried in its place: the deadline is the caller's own, so another attempt past it could not help.

A value that is not a positive, finite number is refused with a MemcoConfigError before anything is sent, because neither end of the range is usefully silent: zero and below expire before the call leaves, and an infinite one sends no deadline at all, so the call never settles.

interface TimeoutOptions {
    timeout?: number;
}

Hierarchy (View Summary)

Index
timeout?: number

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