Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EventConnected is an event name that is fired when a client connects EventConnected = "connected" // EventDisconnected is an event name that is fired when a client disconnects EventDisconnected = "disconnected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
HandlerFunc is a type that defines the function signature of a msgkit request handler
type Message ¶
Message is the structural representation of a msgkit message
func NewMessage ¶
NewMessage produces a new Message reference from the passed type and data
func ParseMessage ¶
ParseMessage parses and returns a new fully populated Message type
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server contains all required dependencies to run a msgkit websocket server
func (*Server) Handle ¶
func (s *Server) Handle(name string, handler HandlerFunc)
Handle binds a handler for a specified type
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket is msgkit socket connection containing context about the connection
func (*Socket) Context ¶
func (s *Socket) Context() interface{}
Context returns the context on the Socket
func (*Socket) SetContext ¶
func (s *Socket) SetContext(ctx interface{})
SetContext applies the passed context interface to the Socket
Click to show internal directories.
Click to hide internal directories.