Documentation ¶
Index ¶
Constants ¶
View Source
const DB_WRITE_THRESHOLD = 100 // the threshold at which the cache is written to Mongo.
Variables ¶
This section is empty.
Functions ¶
func CloseMongoConnection ¶
func CloseMongoConnection(collection string)
func InitMongoConnection ¶
func InitMongoConnection()
func ListCollections ¶
func ListCollections() []string
func ReadAll ¶
Reads all of though data points of a particular type. E.g magheading or boatspeed etc
func WriteToMongo ¶
Types ¶
type DbWriteCache_t ¶
type DbWriteCache_t struct { Count int //number of documents waiting to be written Mem *[DB_WRITE_THRESHOLD][]byte //pomter to array of []byte where the bson documents are cached before they are written }
Click to show internal directories.
Click to hide internal directories.