Config changes

- a source's interval must be greater than 0: a source is turned off with
  enabled, not with a zero interval, so JSCSourcesSource rejects an interval of
  0 or less (its validate is promoted to each source's section);
- max_message_size rejects -1: JSCServerWebSocket rejects a max_message_size
  of -1 (util.ByteSizeNoLimit), as a client could then exhaust the server's
  memory;
- every setting documents what 0 or empty means (zero/none, no limit or a
  default).
This commit is contained in:
bwilliams committed 2026-10-15 16:00:48 +01:00
1 parent 49b824d5a2
commit 0b5fde9563
11 files changed
+116 -23

No files matched your search

+2 -1
View File
@@ -6,7 +6,8 @@ import "reflect"
const JSCKSourceFTSMock string = "fts_mock"
// JSCSourceFTSMock configures fetching from a Find a Tender mock
// server (cmd/mock-fts) at APIRoot.
// server (cmd/mock-fts) at APIRoot, which has no default and must be set when
// the source is enabled.
type JSCSourceFTSMock struct {
JSCSourcesSource
APIRoot string `cfg:"api_root"`