pulumi/pkg/diag
Matt Ellis 7587bcd7ec Have engine emit "events" instead of writing to streams
Previously, the engine would write to io.Writer's to display output.
When hosted in `pulumi` these writers were tied to os.Stdout and
os.Stderr, but other applications hosting the engine could send them
other places (e.g. a log to be sent to an another application later).

While much better than just using the ambient streams, this was still
not the best. It would be ideal if the engine could just emit strongly
typed events and whatever is hosting the engine could care about
displaying them.

As a first step down that road, we move to a model where operations on
the engine now take a `chan engine.Event` and during the course of the
operation, events are written to this channel. It is the
responsibility of the caller of the method to read from the channel
until it is closed (singifying that the operation is complete).

The events we do emit are still intermingle presentation with data,
which is unfortunate, but can be improved over time. Most of the
events today are just colorized in the client and printed to stdout or
stderr without much thought.
2017-10-09 18:24:56 -07:00
..
colors Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
diag.go Clarify aspects of using the DCO 2017-06-26 14:46:34 -07:00
doc.go Clarify aspects of using the DCO 2017-06-26 14:46:34 -07:00
pos.go Clarify aspects of using the DCO 2017-06-26 14:46:34 -07:00
sink.go Have engine emit "events" instead of writing to streams 2017-10-09 18:24:56 -07:00
sink_test.go Improve output formatting 2017-09-23 05:20:11 -07:00