forked from livekit/server-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.go
33 lines (27 loc) · 758 Bytes
/
data.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
package lksdk
type dataPublishOptions struct {
Reliable *bool
DestinationIdentities []string
Topic string
}
type DataReceiveParams struct {
Sender *RemoteParticipant
SenderIdentity string
Topic string // Deprecated: Use UserDataPacket.Topic
}
type DataPublishOption func(*dataPublishOptions)
func WithDataPublishTopic(topic string) DataPublishOption {
return func(o *dataPublishOptions) {
o.Topic = topic
}
}
func WithDataPublishReliable(reliable bool) DataPublishOption {
return func(o *dataPublishOptions) {
o.Reliable = &reliable
}
}
func WithDataPublishDestination(identities []string) DataPublishOption {
return func(o *dataPublishOptions) {
o.DestinationIdentities = identities
}
}