feat: deployment flags (#4426)

This commit is contained in:
Garrett Delfosse
2022-10-10 15:04:15 -04:00
committed by GitHub
parent b50bb99fe7
commit b1faaef482
11 changed files with 949 additions and 284 deletions

View File

@ -82,6 +82,7 @@ type Options struct {
MetricsCacheRefreshInterval time.Duration
AgentStatsRefreshInterval time.Duration
Experimental bool
DeploymentFlags *codersdk.DeploymentFlags
}
// New constructs a Coder API handler.
@ -259,6 +260,10 @@ func New(options *Options) *API {
})
})
})
r.Route("/flags", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Get("/deployment", api.deploymentFlags)
})
r.Route("/audit", func(r chi.Router) {
r.Use(
apiKeyMiddleware,