chore: Separate the provisionerd server into it's own package (#4940)

* chore: Separate the provisionerd server into it's own package

This code should be thoroughly tested now that we understand the abstraction.

I separated it to make our lives a bit easier for external provisioner daemons
as well!

* Add tests

* Add workspace builds

* Add test for workspace resources
This commit is contained in:
Kyle Carberry
2022-11-08 01:10:49 +00:00
committed by GitHub
parent bf2f7b575e
commit da05bbbdf7
10 changed files with 1731 additions and 908 deletions
+7
View File
@@ -397,3 +397,10 @@ func (c *Client) GetAppHost(ctx context.Context) (GetAppHostResponse, error) {
var host GetAppHostResponse
return host, json.NewDecoder(res.Body).Decode(&host)
}
// WorkspaceNotifyChannel is the PostgreSQL NOTIFY
// channel to listen for updates on. The payload is empty,
// because the size of a workspace payload can be very large.
func WorkspaceNotifyChannel(id uuid.UUID) string {
return fmt.Sprintf("workspace:%s", id)
}