Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TopicName is NSQ topic name for our chat server TopicName = "Chat" // MaxInFlight is largest number of messages allowed in flight MaxInFlight = 10 // LookupdPollInterval is interval for polling NSQ for new messages LookupdPollInterval = 30 // ArchiveChannelName is the name of Archive Channel ArchiveChannelName = "Archive" // BotChannelName is the name of Bot Channel BotChannelName = "Bot" )
View Source
const ( // SocketBufferSize set buffer size for websocket connection SocketBufferSize = 1024 // MessageBufferSize set buffer size for websocket message MessageBufferSize = 256 // MaxMessageSize set max size allow for Websocket message MaxMessageSize = 512 // PongWait set limit wait for receive messages from client PongWait = 3 * time.Second // PingPeriod set time to ping client PingPeriod = PongWait * 9 / 10 // WriteWait set limit wait for writing to client WriteWait = 3 * time.Second // ReadTimeout set wait time limit util we got request body ReadTimeout = 5 * time.Second // WriteTimeout set wait time limit util we got response WriteTimeout = 5 * time.Second )
Variables ¶
View Source
var ( // AddrNsqlookupd holds address for nsqlookupd // TODO: Support multiple lookupd addresses AddrNsqlookupd string // AddrNsqd uses for publishing messages only, it should be your local nsqd AddrNsqd string )
View Source
var Mgo *mgo.Session
Mgo hold our Mongodb session
View Source
var Store *sessions.FilesystemStore
Store keep our sessions
View Source
var Templ *template.Template
Templ hold our template collection, and init only once
Functions ¶
func CreateProvider ¶
func CreateProvider(redirectURI string)
CreateProvider return provider with corresponding redirect_uri We only init goth with Google+ for now
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.