Documentation ¶
Index ¶
- Constants
- func Connect(session_id, origin, location string) (OutgoingMessage, IncomingMessage)
- type Authorizer
- type Error
- type ErrorType
- type IncomingMessage
- type Message
- type MessagePipe
- type MessageType
- type OutgoingMessage
- type PusherSessionStats
- type PusherStats
- type Server
- func (self *Server) Authorizer(f Authorizer) *Server
- func (self *Server) Close()
- func (self *Server) Debugf(f string, i ...interface{})
- func (self *Server) Emit(message Message)
- func (self *Server) Errorf(fmt string, i ...interface{})
- func (self *Server) Fatalf(fmt string, i ...interface{})
- func (self *Server) GetSession(id string) (result *Session)
- func (self *Server) Infof(fmt string, i ...interface{})
- func (hub *Server) InternalPipe(session_id string) (*Session, OutgoingMessage, IncomingMessage)
- func (self *Server) Logger(l *log.Logger) *Server
- func (self *Server) Loglevel(i int) *Server
- func (self *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (self *Server) Stats() PusherStats
- type Session
- type Welcome
Constants ¶
View Source
const ( TypeError = "Error" TypeHeartbeat = "Heartbeat" TypeWelcome = "Welcome" TypeSubscribe = "Subscribe" TypeUnsubscribe = "Unsubscribe" TypeMessage = "Message" TypeAuthorize = "Authorize" TypeAck = "Ack" TypeALL = "ALL" )
View Source
const ( TypeJSONError = "JSONError" TypeAuthorizationError = "AuthorizationError" TypeSyntaxError = "SyntaxError" )
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(session_id, origin, location string) (OutgoingMessage, IncomingMessage)
Types ¶
type IncomingMessage ¶
type IncomingMessage <-chan Message
type MessagePipe ¶
type MessageType ¶
type MessageType string
type OutgoingMessage ¶
type OutgoingMessage chan<- Message
type PusherSessionStats ¶
type PusherStats ¶
type PusherStats struct { Sessions map[string]PusherSessionStats `json:"sessions"` Subscriptions map[string]map[string]PusherSessionStats `json:"subscriptions"` Subscribers []string `json:"subscribers"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func StartServer ¶
func (*Server) Authorizer ¶
func (self *Server) Authorizer(f Authorizer) *Server
func (*Server) GetSession ¶
func (*Server) InternalPipe ¶
func (hub *Server) InternalPipe(session_id string) (*Session, OutgoingMessage, IncomingMessage)
func (*Server) Stats ¶
func (self *Server) Stats() PusherStats
Click to show internal directories.
Click to hide internal directories.