Documentation ¶
Index ¶
- Constants
- func DBReplSetGetConfig() (bson.M, error)
- func DBReplSetGetStatus() (bson.M, error)
- func DBServerStatus() (bson.M, error)
- func DBStats() (bson.M, error)
- func DBStatsCollection(colName string) (bson.M, error)
- func EnsureIndexes()
- func EnsureIndexesMessages(collection string)
- func GetCMessages(collection string) *mgo.Collection
- func GetCollectionNames() ([]string, error)
- func GetSlowestQueries() ([]map[string]interface{}, error)
- func NewStore() error
- func RefreshStore()
- type MongoStore
Constants ¶
View Source
const ( // DatabaseName is DatabaseName on mongoBD DatabaseName = "tat" // CollectionDefaultMessages is default names for collections message, if // topic doesn't have "collection" attribute setted CollectionDefaultMessages = "messages" )
Variables ¶
This section is empty.
Functions ¶
func DBReplSetGetConfig ¶
DBReplSetGetConfig returns replSetGetConfig cmd
func DBReplSetGetStatus ¶
DBReplSetGetStatus returns replSetGetStatus cmd
func DBStatsCollection ¶
DBStatsCollection returns stats for given collection
func EnsureIndexesMessages ¶
func EnsureIndexesMessages(collection string)
EnsureIndexesMessages set indexes on a message collection
func GetCMessages ¶
func GetCMessages(collection string) *mgo.Collection
GetCMessages return mgo collection
func GetCollectionNames ¶
GetCollectionNames returns collection names
func GetSlowestQueries ¶
GetSlowestQueries returns the slowest queries
func RefreshStore ¶
func RefreshStore()
RefreshStore calls Refresh on mongoDB Store, in order to avoid lost connection
Types ¶
type MongoStore ¶
type MongoStore struct { Session *mgo.Session CGroups *mgo.Collection CDefaultMessages *mgo.Collection CPresences *mgo.Collection CTopics *mgo.Collection CUsers *mgo.Collection CSockets *mgo.Collection }
MongoStore stores MongoDB Session and collections
Click to show internal directories.
Click to hide internal directories.