7120a729bd
+ DB access is now right and uses copied sessions + DB session is now specifying the safe state and the mode + Fixed the issue with too early ICCC messages regarding to late cache + Add the MIME type for Dart + Fixed the issuse with wrong order of shutdown handlers - TODO: Testing of these changes
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
package ICCC
|
|
|
|
import "sync"
|
|
import "container/list"
|
|
import "labix.org/v2/mgo"
|
|
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
|
|
|
const (
|
|
ChannelSYSTEM string = `System`
|
|
ChannelNUMGEN string = `System::NumGen`
|
|
ChannelSHUTDOWN string = `System::Shutdown`
|
|
ChannelSTARTUP string = `System::Startup`
|
|
ChannelICCC string = `System::ICCC`
|
|
)
|
|
|
|
var (
|
|
senderName LM.Sender = `ICCC`
|
|
db *mgo.Database = nil
|
|
dbSession *mgo.Session = nil
|
|
collectionListener *mgo.Collection = nil
|
|
collectionHosts *mgo.Collection = nil
|
|
reservedSystemChannels []string = []string{ChannelSYSTEM, ChannelNUMGEN, ChannelSHUTDOWN, ChannelSTARTUP, ChannelICCC}
|
|
listeners map[string]func(data map[string][]string) = nil
|
|
listenersLock sync.RWMutex = sync.RWMutex{}
|
|
cacheListenerDatabase *list.List = nil
|
|
cacheListenerDatabaseLock sync.RWMutex = sync.RWMutex{}
|
|
correctAddressWithPort string = ``
|
|
)
|