config

package
v0.0.0-...-b15ad40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 12 Imported by: 0

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

Store keep our sessions

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL