-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.php
39 lines (32 loc) · 909 Bytes
/
init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require_once './vendor/autoload.php';
use SDPMlab\Anser\Service\ServiceList;
use SDPMlab\Anser\Orchestration\Saga\Cache\CacheFactory;
use SDPMlab\Anser\Orchestration\Saga\Cache\Redis\Config;
ServiceList::addLocalService(
name: "ProductionService",
address: "production-service",
port: 8080,
isHttps: false
);
ServiceList::addLocalService(
name: "UserService",
address: "user-service",
port: 8080,
isHttps: false
);
ServiceList::addLocalService(
name: "OrderService",
address: "order-service",
port: 8080,
isHttps: false
);
//定義常數 Log 位置
define("LOG_PATH", __DIR__ . DIRECTORY_SEPARATOR ."Logs" . DIRECTORY_SEPARATOR);
//定義 Orch 備援機制 Cache 連線資訊
CacheFactory::initCacheDriver(CacheFactory::CACHE_DRIVER_PREDIS, new Config(
host: "anser_redis",
port: 6379,
db: 1,
serverName: 'AnserTutorialService'
));