-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.go
37 lines (31 loc) · 921 Bytes
/
config.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
package lightcable
// Config describes the configuration of the server.
type Config struct {
// register, unregister room buffer count
SignBufferCount int
// broadcast message to room buffer count
CastBufferCount int
Worker WorkerConfig
}
// Worker Config describes the configuration of the server.
// server should worker, every worker use this configuration
type WorkerConfig struct {
// register, unregister client buffer count
SignBufferCount int
// broadcast message to client buffer count
CastBufferCount int
// If you set this option as `false`
// The server will not broadcast to you messages you send.
// Look like MQTTv5 nolocal
Local bool
}
// DefaultConfig is a server with all fields set to the default values.
var DefaultConfig = &Config{
SignBufferCount: 128,
CastBufferCount: 128,
Worker: WorkerConfig{
SignBufferCount: 128,
CastBufferCount: 128,
Local: false,
},
}