Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 959 Bytes

reference.md

File metadata and controls

34 lines (19 loc) · 959 Bytes

Reference

Below a reference can be found of how you can get started with this SDK, utilizing the different features offered by Dapr.

Service Invocation

The service invocation methods are created as a warpper on the Dapr Service Invocation API.

Invoking a method

await client.invoker.invoke("app-id", "method", { hello: "world" });

Listening to a method call

On top of the invoking, this SDK also implements a trivial way to listen to app invocations. Instead of creating your own web server, you can simply run the following commands which will listen to calls coming in on the provided endpoint.

const invokerListen = (req: IRequest, res: IResponse) => { console.log(data); }
await client.invoker.listen("method", invokerListen.bind(this), options)

State Management

Pub/Sub

Bindings

Actors

Secrets