Move all server and controller packages into top-level

This commit is contained in:
Harshavardhana
2015-09-19 00:52:01 -07:00
parent d808c3685d
commit d54488f144
80 changed files with 20431 additions and 258 deletions
+33
View File
@@ -0,0 +1,33 @@
package mgo
import (
"time"
)
func HackPingDelay(newDelay time.Duration) (restore func()) {
globalMutex.Lock()
defer globalMutex.Unlock()
oldDelay := pingDelay
restore = func() {
globalMutex.Lock()
pingDelay = oldDelay
globalMutex.Unlock()
}
pingDelay = newDelay
return
}
func HackSyncSocketTimeout(newTimeout time.Duration) (restore func()) {
globalMutex.Lock()
defer globalMutex.Unlock()
oldTimeout := syncSocketTimeout
restore = func() {
globalMutex.Lock()
syncSocketTimeout = oldTimeout
globalMutex.Unlock()
}
syncSocketTimeout = newTimeout
return
}