58300f9ee7
These changes add the API types and cloud backend code necessary to interact with service-managed stacks (i.e. stacks that do not have PPC-managed deployments). The bulk of these changes are unremarkable: the API types are straightforward, as are most of the interactions with the new APIs. The trickiest bits are token and log management. During an update to a managed stack, the CLI must continually renew the token used to authorize the operations on that stack that comprise the update. Once a token has been renewed, the old token should be discarded. The CLI supports this by running a goroutine that is responsible for both periodically renewing the token for an update and servicing requests for the token itself from the rest of the backend. In addition to token renewal, log output must be captured and uploaded to the service during an update to a managed stack. Implementing this in a reasonable fashion required a bit of refactoring in order to reuse what already exists for the local backend. Each event-specific `Display` function was replaced with an equivalent `Render` function that returns a string rather than writing to a stream. This approach was chosen primarily to avoid dealing with sheared colorization tags, which would otherwise require clients to fuse log lines before colorizing. We could take that approach in the future. |
||
---|---|---|
.. | ||
core.go | ||
errors.go | ||
history.go | ||
logs.go | ||
stacks.go | ||
updates.go |