Ocean/ICCC/Variables.go
Thorsten Sommer a007db1b79 Bug fixes and improvements
+ Add a function to the Tools package to provide the local IP address
and port
+ Add a function to the Tools package to provide a time as formated
string as yyyyMMdd hhmmss.fff
+ Improved the ICCC startup message: Now, the message contains the IP
address and port of the stared server
+ Add a new configuration to specific the necessary Ocean servers' port
(internally, not the public port)
+ The template package reports now which version out of the grid FS is
used.
+ The Ocean server is now bound to the correct IP address and port
(rule: the local IP address!)
+ The order of the system shutdown handlers were wrong!
+ The early ICCC messages problem is now fixed!
+ Fixed an ICCC bug for the case, that a message does not have any
payload!
+ Also the configuration database uses now the correct mgo MongoDB rules
(SetSafe & SetMode)
2014-06-08 11:35:01 +02:00

31 lines
1.4 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{}
startCacheTimerLock sync.Mutex = sync.Mutex{}
cacheTimerRunning bool = false
correctAddressWithPort string = ``
)