mirror of https://github.com/pulumi/pulumi.git
2d3a1ecc3e
This changes the language plugins for Go, Node, and Python to watch for the os.Interrupt signal (SIGINT on Unix, CTRL_BREAK on Windows) that the plugin lifetime manager sends (per #13795) and exit cleanly on receiving the signal. This is a no-op for users. An immediate effect it'll have for us is that we'll begin seeing test coverage data come out of these binaries. A similar change is necessary in other language plugin binaries. I did not touch uses of rpcutil.ServeWithOptions outside `main` packages because whether a signal handler should be installed there or not requires more knowledge of individual cases. Note that this uses [signal.NotifyContext][1]. Calling the returned `cancel()` function removes the signal handler. This is desirable so that if a user sends the signal again (e.g., presses Ctrl-C again), we don't capture it and let the OS kill the process. [1]: https://pkg.go.dev/os/signal#NotifyContext Refs #9780 |
||
---|---|---|
.. | ||
auto | ||
common | ||
internal | ||
pulumi | ||
pulumi-language-go | ||
pulumix | ||
Makefile | ||
README.md |
README.md
Pulumi Golang SDK
This directory contains support for writing Pulumi programs in the Go language. There are two aspects to this:
pulumi/
contains the client language bindings Pulumi program's code directly against;pulumi-language-go/
contains the language host plugin that the Pulumi engine uses to orchestrate updates.
To author a Pulumi program in Go, simply say so in your Pulumi.yaml
name: <my-project>
runtime: go
and ensure you have pulumi-language-go
on your path (it is distributed in the Pulumi download automatically).
By default, the language plugin will use your project's name, <my-project>
, as the executable that it loads. This too
must be on your path for the language provider to load it when you run pulumi preview
or pulumi up
.