go1/app

This package is abandoned and no longer maintained. No replacement package was suggested.

Maintainers

Details

github.com/go1com/app

Source

Installs: 24 727

Dependents: 2

Suggesters: 1

Security: 0

Stars: 2

Watchers: 9

Forks: 0

v2.1.10 2017-09-05 06:12 UTC

README

Base microservice application.

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 go1\App(['cacheOptions' => $options]);

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

Logging service

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

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

HTTP client service

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

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