Documentation ¶
Overview ¶
Package configurations contains all the configuration parameters and data structures for the server initialization.
Index ¶
Constants ¶
const ( MYSQL_DRIVER = "mysql" MYSQL_USER = "gamemate_agent" MYSQL_PASSWORD = "elGq9WjXWfuqqJIDP2Zu" MYSQL_DB_NAME = "gamemate_archives" MYSQL_HOST = "localhost:3306" )
const ( REDIS_HOST string = "127.0.0.1" //Address of the Redis server REDIS_PORT int = 6379 //Port of the Redis server REDIS_MAX_CONNECTIONS int = 12000 //Max number of simultaneous connections allowed to the Redis server REDIS_DATABASE int = 1 //Database to connect to. )
Variables ¶
var ArchivesInitialized = false
ArchivesInitialized is true if a pool of connections to the archives has been initialized at least once.
var ArchivesPool *sql.DB
ArchivesPool is a pool of connections to the archive of the system (in this case using MySQL).
var CacheInitialized = false
CacheInitialized is true if the Pool has been initialized at least one time.
var CachePool *redis.Pool
CachePool represents the pool which connects to the cache (using Redis).
Functions ¶
func ClearExpiredCache ¶
func ClearExpiredCache() error
ClearExpiredCache must be run every N minutes with a timer to clear the cache from the expired stuff.
func ExpireDaylyCacheAtMidnight ¶
ExpireDaylyCacheAtMidnight expires all cache items which must be reset at midnight (UTC).
This is a routine.
func InitArchives ¶
func InitArchives() error
InitArchives links the archives with the system with the global options.
func InitArchivesWithAuth ¶
InitArchivesWithAuth Creates a MySQL communication point for the API for the Data.
func InitServer ¶
InitServer configures the server for fresh start with the default configuration.
Types ¶
This section is empty.