Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Time allowed to write a message to the peer. WriteWait = 10 * time.Second // Time allowed to read the next pong message from the peer. PongWait = 60 * time.Second // Send pings to peer with this period. Must be less than pongWait. PingPeriod = (PongWait * 9) / 10 // Maximum message size allowed from peer. MaxMessageSize int64 = 64 * 1024 )
View Source
var ( ReadBufferSize int = 1024 WriteBufferSize int = 1024 )
View Source
var LogLevel string = "DEBUG"
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct { sync.Mutex // protects connections Broadcast chan *Message // fan out message to all connections Mailbox chan *MailMessage // fan out message to subscriber SubscriptionTokenizer Tokenizer // for user subscription token validation // contains filtered or unexported fields }
func (*Hub) Connections ¶
type MailMessage ¶
type Tokenizer ¶
func HmacSha256Tokenizer ¶
type TokenizerFunc ¶
func (TokenizerFunc) Tokenize ¶
func (tf TokenizerFunc) Tokenize(username string) string
Click to show internal directories.
Click to hide internal directories.