-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
52 lines (45 loc) · 1 KB
/
types.go
File metadata and controls
52 lines (45 loc) · 1 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
package go_socketio_redis_adapter
import "sync"
// request types.
const (
roomLenReqType = "0"
clearRoomReqType = "1"
allRoomReqType = "2"
)
// request structs.
type roomLenRequest struct {
RequestType string
RequestID string
Room string
numSub int `json:"-"`
msgCount int `json:"-"`
connections int `json:"-"`
mutex sync.Mutex `json:"-"`
done chan bool `json:"-"`
}
// response struct.
type roomLenResponse struct {
RequestType string
RequestID string
Connections int
}
type clearRoomRequest struct {
RequestType string
RequestID string
Room string
UUID string
}
type allRoomRequest struct {
RequestType string
RequestID string
rooms map[string]bool `json:"-"`
numSub int `json:"-"`
msgCount int `json:"-"`
mutex sync.Mutex `json:"-"`
done chan bool `json:"-"`
}
type allRoomResponse struct {
RequestType string
RequestID string
Rooms []string
}