-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigs.go
More file actions
89 lines (67 loc) · 2.23 KB
/
Copy pathconfigs.go
File metadata and controls
89 lines (67 loc) · 2.23 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package streaming
import (
"time"
"github.com/xraph/forge/extensions/streaming/internal"
)
// DI container keys for streaming extension services.
const (
// ManagerKey is the DI key for the streaming manager.
ManagerKey = "streaming"
)
func DefaultConfig() Config {
return internal.DefaultConfig()
}
func WithConfig(config Config) ConfigOption {
return internal.WithConfig(config)
}
func WithAuthentication(username, password string) ConfigOption {
return internal.WithAuthentication(username, password)
}
func WithBackend(backend string) ConfigOption {
return internal.WithBackend(backend)
}
func WithBackendURLs(urls ...string) ConfigOption {
return internal.WithBackendURLs(urls...)
}
func WithRedisBackend(url string) ConfigOption {
return internal.WithRedisBackend(url)
}
func WithNATSBackend(urls ...string) ConfigOption {
return internal.WithNATSBackend(urls...)
}
func WithFeatures(rooms, channels, presence, typing, history bool) ConfigOption {
return internal.WithFeatures(rooms, channels, presence, typing, history)
}
func WithConnectionLimits(perUser, roomsPerUser, channelsPerUser int) ConfigOption {
return internal.WithConnectionLimits(perUser, roomsPerUser, channelsPerUser)
}
func WithMessageLimits(maxSize, maxPerSecond int) ConfigOption {
return internal.WithMessageLimits(maxSize, maxPerSecond)
}
func WithTimeouts(ping, pong, write time.Duration) ConfigOption {
return internal.WithTimeouts(ping, pong, write)
}
func WithBufferSizes(read, write int) ConfigOption {
return internal.WithBufferSizes(read, write)
}
func WithMessageRetention(retention time.Duration) ConfigOption {
return internal.WithMessageRetention(retention)
}
func WithPresenceTimeout(timeout time.Duration) ConfigOption {
return internal.WithPresenceTimeout(timeout)
}
func WithTypingTimeout(timeout time.Duration) ConfigOption {
return internal.WithTypingTimeout(timeout)
}
func WithNodeID(nodeID string) ConfigOption {
return internal.WithNodeID(nodeID)
}
func WithTLS(certFile, keyFile, caFile string) ConfigOption {
return internal.WithTLS(certFile, keyFile, caFile)
}
func WithRequireConfig(require bool) ConfigOption {
return internal.WithRequireConfig(require)
}
func WithLocalBackend() ConfigOption {
return internal.WithLocalBackend()
}