chore: Implement workspace proxy going away (graceful shutdown) (#7459)

* chore: Implement workspace proxy going away

When a workspace proxy shuts down, the health status of that
proxy should immediately be updated. This is purely a courtesy
and technically not required
This commit is contained in:
Steven Masley
2023-05-10 19:23:16 -05:00
committed by GitHub
parent a42a36a474
commit b7f4f3a771
13 changed files with 202 additions and 24 deletions

View File

@ -48,6 +48,7 @@ type Options struct {
EntitlementsUpdateInterval time.Duration
SCIMAPIKey []byte
UserWorkspaceQuota int
ProxyHealthInterval time.Duration
}
// New constructs a codersdk client connected to an in-memory Enterprise API instance.
@ -74,6 +75,7 @@ func NewWithAPI(t *testing.T, options *Options) (*codersdk.Client, io.Closer, *c
Options: oop,
EntitlementsUpdateInterval: options.EntitlementsUpdateInterval,
Keys: Keys,
ProxyHealthInterval: options.ProxyHealthInterval,
})
assert.NoError(t, err)
setHandler(coderAPI.AGPL.RootHandler)