Documentation ¶
Index ¶
- Constants
- func CloseAuthdConn(id string)
- func ConnsInfoAuthd() (infos []map[string]interface{})
- func CorePulseProc(req *reqres.Req) (data interface{}, err error)
- func DeregisterConn(ws *Conn)
- func DumpConnsAuthd(header string) string
- func DumpConnsPublic(header string) string
- func GetBroadcaster_Authd() func(string, interface{}) (err error)
- func GetBroadcaster_Public() func(string, interface{}) (err error)
- func Handle(w http.ResponseWriter, r *http.Request, router *reqres.WebSocket_Router, ...)
- func Handle_NotAuthd(w http.ResponseWriter, r *http.Request)
- func Initialize(verGetter func() string, onPanic func(string, string, ...interface{})) (err error)
- func NewResponse(req *reqres.Req, data interface{}) []byte
- func NewResponse_Broadcast(id int, op string, data interface{}) []byte
- func NewResponse_Err(req *reqres.Req, err *errors.ResError) []byte
- func ParseReq(raw []byte) (req *reqres.Req, err error)
- func RegisterConn(ws *Conn)
- func Respond(conn *Conn, res []byte) (err error)
- type Conn
- type Message
Constants ¶
View Source
const ( CHAN_MESSAGE_MAX = 1024 CHAN_MESSAGE_BROADCAST_MAX = 100 CHAN_MESSAGE_FAILED_MAX = 100 LOST_MESSAGE_MAX_LIFE = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ConnsInfoAuthd ¶
func ConnsInfoAuthd() (infos []map[string]interface{})
func CorePulseProc ¶
Response to pulse by returning current app deployment info.
func DeregisterConn ¶
func DeregisterConn(ws *Conn)
Deregisteres connection by removing it from the registry.
func DumpConnsAuthd ¶
func DumpConnsPublic ¶
func GetBroadcaster_Authd ¶
Returns authenticated broadcaster.
func GetBroadcaster_Public ¶
Returns public broadcaster.
func Handle ¶
func Handle(w http.ResponseWriter, r *http.Request, router *reqres.WebSocket_Router, isAuthd bool)
Creates WS connecttion and processes it in forever loop.
func Handle_NotAuthd ¶
func Handle_NotAuthd(w http.ResponseWriter, r *http.Request)
Handles WS Not Authd response.
func Initialize ¶
Initializes websocket package. OnPanic handler must be provided.
func NewResponse ¶
Marshals successful data response.
func NewResponse_Broadcast ¶
Marshals broadcast response.
func NewResponse_Err ¶
Marshals error condition.
Types ¶
Click to show internal directories.
Click to hide internal directories.