gc/app

Base microservice application.

This package's canonical repository appears to be gone and the package has been frozen as a result.

v1.0 2018-04-29 03:43 UTC

This package is not auto-updated.

Last update: 2019-12-27 16:46:36 UTC


README

Build Status Latest Stable Version Total Downloads License

Cache service

The cache service will become Doctrine\Common\Cache\ArrayCache on testing.

# Memcache backend
$options = ['backend' => 'memcache', 'host' => '127.0.0.1', 'port' => '11211'];

# Memcached
$options = ['backend' => 'memcached', 'host' => '127.0.0.1', 'port' => '11211'];

# File system backend
$options = ['backend'   => 'filesystem', 'directory' => '/path/to/cache/'];

$app = new gc\App(['cacheOptions' => $options]);

// Acces `cache` service, instance of `Doctrine\Common\Cache\CacheProvider`
$cache = $app['cache'];

Logging service

$options = ['name' => 'go1'];
$app = new gc\App(['logOptions' => $options]);

// Access `logger` service, instance of `Psr\Log\LoggerInterface`
$logger = $app['logger'];

HTTP client service

$options = ['allow_redirects' => false];
$app = new gc\App(['clientOptions' => $options]);

// Access `client` service, instance of `GuzzleHttp\Client`
$client = $app['client'];