-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoptions.go
23 lines (19 loc) · 838 Bytes
/
options.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package gotiktoklive
type TikTokLiveOption func(t *TikTok)
// DoNotAutoReconnect prevents auto retrying to reconnect to the TikTok webcast backend once after a failure, which is
// the default behavior. This is useful for if you have a program trying to monitor and manage the reconnections by
// monitoring the live Events channel for closure.
func DoNotAutoReconnect(t *TikTok) {
t.shouldReconnect = false
}
// SigningApiKey sets the singer API key.
func SigningApiKey(apiKey string) TikTokLiveOption {
return func(t *TikTok) {
t.apiKey = apiKey
}
}
// EnableExperimentalEvents enables experimental events that have not been figured out yet and the API for them
// is not stable. It may also induce additional logging that might be undesirable.
func EnableExperimentalEvents(t *TikTok) {
t.enableExperimentalEvents = true
}