Archived
2
0

add members & host to stats.

This commit is contained in:
m1k1o
2021-03-19 22:06:40 +01:00
parent bbae073104
commit b96ba47224
4 changed files with 23 additions and 9 deletions

View File

@ -2,6 +2,12 @@ package types
import "net/http"
type Stats struct {
Connections uint32 `json:"connections"`
Host string `json:"host"`
Members []*Member `json:"members"`
}
type WebSocket interface {
Address() string
Send(v interface{}) error
@ -12,6 +18,6 @@ type WebSocketHandler interface {
Start() error
Shutdown() error
Upgrade(w http.ResponseWriter, r *http.Request) error
TotalConns() uint32
Stats() Stats
IsAdmin(password string) (bool, error)
}