configurations

package
v0.0.0-...-659eabc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

README

GameMate

A fancy Game Architecture for next generation companies (Written in Go!!)


This package contains all configurations for all components of the software architecture.

Documentation

Overview

Package configurations contains all the configuration parameters and data structures for the server initialization.

Index

Constants

View Source
const (
	MYSQL_DRIVER   = "mysql"
	MYSQL_USER     = "gamemate_agent"
	MYSQL_PASSWORD = "elGq9WjXWfuqqJIDP2Zu"
	MYSQL_DB_NAME  = "gamemate_archives"
	MYSQL_HOST     = "localhost:3306"
)
View Source
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

View Source
var ArchivesInitialized = false

ArchivesInitialized is true if a pool of connections to the archives has been initialized at least once.

View Source
var ArchivesPool *sql.DB

ArchivesPool is a pool of connections to the archive of the system (in this case using MySQL).

View Source
var CacheInitialized = false

CacheInitialized is true if the Pool has been initialized at least one time.

View Source
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

func ExpireDaylyCacheAtMidnight(server *echo.Echo)

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

func InitArchivesWithAuth(user string, password string) error

InitArchivesWithAuth Creates a MySQL communication point for the API for the Data.

func InitCache

func InitCache()

InitCache creates a Redis communication point for the API cache.

func InitServer

func InitServer() *echo.Echo

InitServer configures the server for fresh start with the default configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL