rpc package
Classes
|
Class |
Description |
|---|---|
|
Generic cache registry | |
|
Represents a delay expressed as a numeric timer value in a given time unit. Used to defer IMQ request processing. | |
|
Class IMQLock. Implements promise-based locks. | |
|
Arbitrary, JSON-serializable metadata bag carried alongside an IMQ request. Each property value must be a valid JSON value. | |
|
Class RedisCache. Implements a cache engine on top of Redis. |
Abstract Classes
|
Abstract Class |
Description |
|---|---|
|
Class IMQClient - base abstract class for service clients. | |
|
Class IMQService Basic abstract service (server-side) implementation |
Functions
|
Function |
Description |
|---|---|
|
Implements the '@classType' decorator factory. Applied to a complex-type class, it registers the class's '@property' field definitions into the RPC type description so the type can be exposed to service clients. It is required on any class that uses '@property': standard (TC39) field decorators cannot see the class they belong to, so a class-level decorator is needed to flush the collected properties under the class name. | |
|
Returns the metadata of the in-flight IMQ request for the current async execution, if any. Returns {IMQMetadata | undefined} | |
|
Expose decorator factory. Applied to a service method, it registers that method in the RPC service description. (Complex argument/return types are registered separately via the '@classType' decorator on those classes.) {(value: any, context: ClassMethodDecoratorContext) => void} | |
|
Builds a call rejector that rejects the pending promise and then runs the optional after-call hook. | |
|
Builds a call resolver that resolves the pending promise and then runs the optional after-call hook. | |
|
Builds a JSON representation of an IMQ error. | |
|
Implements '@indexed' decorator factory This is used to specify complex service types which are need to expose types containing indexed definition, for example: | |
|
Creates a | |
|
Creates a | |
|
Extracts method JSDoc blocks from original source text of a given class. The text may be TypeScript (type annotations, generics, modifiers, decorators), which acorn cannot parse — so extraction is textual: the search is narrowed to the class region (from the class declaration to the next class declaration or EOF), and each doc block is attributed to the method whose declaration head immediately follows it. When several blocks precede a method, the closest one wins, matching the runtime parser. | |
|
Flushes definitions collected on a class into the RPC type description. Invoked by class-level decorators once the class (and hence its name) is available. | |
|
Creates a {Function} - a dual-mode method decorator | |
|
Runs the given function with The binding is scoped to the function: it is established for the duration of the call and automatically removed afterwards, which keeps concurrent requests isolated from one another. | |
|
Sends IMQ response with support of after call optional hook |
Interfaces
|
Interface |
Description |
|---|---|
|
Method argument description | |
|
Generic cache adapter interface. Any cache engine implementation must conform to this contract to be usable within IMQ. | |
|
Constructor signature for cache adapter implementations. | |
|
Hook invoked after a service method call has been handled. | |
|
Hook invoked before a service method call is dispatched. | |
|
Options accepted by a generated IMQ client. | |
|
Options for the built-in metrics server. | |
|
Response error data structure, which service returns if error occurred during service method execution. | |
|
Request message data structure to be handled by a service. | |
|
Response message data structure that a service replies with to handled requests. | |
|
Options accepted by an IMQ service. | |
|
Around hook wrapping the actual service method invocation. It receives the request/response and a | |
|
Method description | |
|
Methods collection description | |
|
Type property description | |
|
Return value description | |
|
Service class description | |
|
Service description | |
|
Type properties collection description | |
|
Entire service types metadata structure |
Variables
|
Variable |
Description |
|---|---|
|
Creates a | |
|
Default client options {IMQClientOptions} | |
|
Default metrics server options {NonNullable | |
|
Default service options {IMQServiceOptions} | |
Type Aliases
|
Type Alias |
Description |
|---|---|
|
Accepted cache adapter references: a constructor, an instance, or an adapter name. | |