-
Notifications
You must be signed in to change notification settings - Fork 1
/
longpoll_deprecated.go
34 lines (31 loc) · 1.24 KB
/
longpoll_deprecated.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
package golongpoll
import (
"log"
)
// DEPRECATED. Use StartLongpoll or StartLongpoll instead.
func CreateManager() (*LongpollManager, error) {
log.Printf("WARNING: the function golongpoll.CreateManager is deprectated and should no longer be used.\n")
return StartLongpoll(Options{
LoggingEnabled: true,
MaxLongpollTimeoutSeconds: 180,
MaxEventBufferSize: 250,
// Original behavior maintained, events are never deleted unless they're
// pushed out by max buffer size exceeded.
EventTimeToLiveSeconds: FOREVER,
DeleteEventAfterFirstRetrieval: false,
})
}
// DEPRECATED. Use StartLongpoll or StartLongpoll instead.
func CreateCustomManager(maxTimeoutSeconds, eventBufferSize int,
loggingEnabled bool) (*LongpollManager, error) {
log.Printf("WARNING: the function golongpoll.CreateCustomManager is deprectated and should no longer be used.\n")
return StartLongpoll(Options{
LoggingEnabled: loggingEnabled,
MaxLongpollTimeoutSeconds: maxTimeoutSeconds,
MaxEventBufferSize: eventBufferSize,
// Original behavior maintained, events are never deleted unless they're
// pushed out by max buffer size exceeded.
EventTimeToLiveSeconds: FOREVER,
DeleteEventAfterFirstRetrieval: false,
})
}