~emersion/soju

1558816a7e492fe68e8c9f39e5c50e7f5153ba84 — Simon Ser 10 months ago be3c6d7
server: drop TODO about configurable vars

It might make sense to make some of these configurable, some not.
We'll decide on a case-by-case basis if/when good use-cases come
up.
1 files changed, 16 insertions(+), 15 deletions(-)

M server.go
M server.go => server.go +16 -15
@@ 26,21 26,22 @@ import (
	"git.sr.ht/~emersion/soju/identd"
)

// TODO: make configurable
var retryConnectMinDelay = time.Minute
var retryConnectMaxDelay = 10 * time.Minute
var retryConnectJitter = time.Minute
var connectTimeout = 15 * time.Second
var writeTimeout = 10 * time.Second
var upstreamMessageDelay = 2 * time.Second
var upstreamMessageBurst = 10
var backlogTimeout = 10 * time.Second
var handleDownstreamMessageTimeout = 10 * time.Second
var downstreamRegisterTimeout = 30 * time.Second
var webpushCheckSubscriptionDelay = 24 * time.Hour
var webpushPruneSubscriptionDelay = 30 * 24 * time.Hour
var chatHistoryLimit = 1000
var backlogLimit = 4000
var (
	retryConnectMinDelay           = time.Minute
	retryConnectMaxDelay           = 10 * time.Minute
	retryConnectJitter             = time.Minute
	connectTimeout                 = 15 * time.Second
	writeTimeout                   = 10 * time.Second
	upstreamMessageDelay           = 2 * time.Second
	upstreamMessageBurst           = 10
	backlogTimeout                 = 10 * time.Second
	handleDownstreamMessageTimeout = 10 * time.Second
	downstreamRegisterTimeout      = 30 * time.Second
	webpushCheckSubscriptionDelay  = 24 * time.Hour
	webpushPruneSubscriptionDelay  = 30 * 24 * time.Hour
	chatHistoryLimit               = 1000
	backlogLimit                   = 4000
)

var errWebPushSubscriptionExpired = fmt.Errorf("Web Push subscription expired")