package main

var events = []string{"message", "timer", "priority", "cmd"}

type Message struct {
	Event string      `json:"event"`
	Data  interface{} `json:"data"`
	Id    string      `json:"id"`
}

type ClientChan chan Message

type Client struct {
	Id     string     `json:"id"`
	Ip     string     `json:"ip"`
	Chan   ClientChan `json:"chan"`
	Events []string   `json:"events"`
}

type SseStream struct {
	Clients []Client       `json:"clients"`
	MsgId   map[string]int `json:"msgid"`
	Events  []string       `json:"events"`
	Data    interface{}    `json:"data"`
}
