Ocean/ICCC/Variables.go
Thorsten Sommer 7120a729bd Bug fixing
+ 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
2014-06-04 21:41:18 +02:00

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 = ``
)