pulumi/sdk
Alex Clemmer 038f920dc3 Make streamInvoke gracefully-cancellable from SDKs
The @pulumi/pulumi TypScript SDK exposes `streamInvoke`, which returns a
(potentially infinite) stream of responses. This currently is _assumed_
to be infinite, in that there is no way to signal cancellation, and
prevents Pulumi from being able to clean up when we're finished using
the results of the `streamInvoke`.

This commit will introduce a `StreamInvokeResult` type, which is an
`AsyncIterable` that also exposes a `cancel` function, whih does just
this.

Use it like this:

    // `streamInvoke` to retrieve all updates to any `Deployment`, enumerate 0
    // updates from the stream, then `cancel` giving the Kubernetes provider to
    // clean up and close gracefully.
    const deployments = await streamInvoke("kubernetes:kubernetes:watch", {
        group: "apps", version: "v1", kind: "Deployment",
        break;
    });
    deployments.cancel();
2019-11-05 10:47:48 -08:00
..
dotnet Remove .NET examples (#3419) 2019-10-30 08:16:06 +01:00
go Add publishing to nuget support (#3416) 2019-10-29 20:14:49 -07:00
nodejs Make streamInvoke gracefully-cancellable from SDKs 2019-11-05 10:47:48 -08:00
proto Add StreamInvoke to Provider gRPC interface 2019-11-05 10:47:48 -08:00
python Add StreamInvoke to Provider gRPC interface 2019-11-05 10:47:48 -08:00
README.md Update stale README 2018-06-30 09:55:12 -07:00

Pulumi Language SDKs

This directory contains the Pulumi SDKs for all supported languages.

Please see the respective READMEs for information about installing and using these libraries:

The language providers work by implementing gRPC interfaces defined in proto/.