Add server stats websocket reporting
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
|
||||
// Options configures the HTTP handler.
|
||||
type Options struct {
|
||||
// ServerStatsSampler overrides host sampling for deterministic tests.
|
||||
ServerStatsSampler ServerStatsSampler
|
||||
// AllowAuthoring permits publishing immutable definitions. Execution servers
|
||||
// default to run-only: a CLI --yes flag or raw RPC cannot grant this server
|
||||
// capability. Enable deliberately on a separate trusted authoring instance.
|
||||
@@ -277,6 +279,10 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
if handleDirectoryListing(request, write) {
|
||||
continue
|
||||
}
|
||||
if request.Type == protocol.ServerStatsRequest {
|
||||
go handleServerStats(connCtx, request, runs, options.ServerStatsSampler, started, build, write)
|
||||
continue
|
||||
}
|
||||
if handleNotificationSettings(ctx, request, settingsStore, write) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user