/
globals.go
51 lines (40 loc) · 1.28 KB
/
globals.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package server
import (
"github.com/flowline-io/flowbot/internal/ruleset/cron"
"github.com/flowline-io/flowbot/internal/workflow"
"github.com/flowline-io/flowbot/pkg/channels/crawler"
"time"
)
var globals struct {
// Indicator that shutdown is in progress
shuttingDown bool
// Sessions cache.
sessionStore *SessionStore
// Add Strict-Transport-Security to headers, the value signifies age.
// Empty string "" turns it off
tlsStrictMaxAge string
// Listen for connections on this address:port and redirect them to HTTPS port.
tlsRedirectHTTP string
// Maximum message size allowed from peer.
maxMessageSize int64
// Maximum allowed upload size.
maxFileUploadSize int64
// Periodicity of a garbage collector for abandoned media uploads.
mediaGcPeriod time.Duration
// Prioritize X-Forwarded-For header as the source of IP address of the client.
useXForwardedFor bool
// Time before the call is dropped if not answered.
callEstablishmentTimeout int
// Websocket per-message compression negotiation is enabled.
wsCompression bool
// URL of the main endpoint.
servingAt string
// Crawler
crawler *crawler.Crawler
// Cron
cronRuleset []*cron.Ruleset
// Workflow
taskQueue *workflow.Queue
manager *workflow.Manager
cronTaskManager *workflow.CronTaskManager
}