]>
code.octet-stream.net Git - broadcaster/blob - server/status.go
4 "code.octet-stream.net/broadcaster/protocol"
7 type ServerStatus
struct {
8 statuses
map[int]protocol
.StatusMessage
12 var status ServerStatus
14 func InitServerStatus() {
15 status
= ServerStatus
{
16 statuses
: make(map[int]protocol
.StatusMessage
),
17 changeWait
: make(chan bool),
21 func (s
*ServerStatus
) MergeStatus(radioId
int, status protocol
.StatusMessage
) {
22 s
.statuses
[radioId
] = status
26 func (s
*ServerStatus
) RadioDisconnected(radioId
int) {
27 delete(s
.statuses
, radioId
)
31 func (s
*ServerStatus
) TriggerChange() {
33 s
.changeWait
= make(chan bool)
36 func (s
*ServerStatus
) Statuses() map[int]protocol
.StatusMessage
{
40 func (s
*ServerStatus
) ChangeChannel() chan bool {