Skip to content

Commit 778bc38

Browse files
committed
Added the config resource of json rpc with service governance
1 parent 4a1f9cc commit 778bc38

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

installer/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
'hyperf/rpc-server',
8989
],
9090
'resources' => [
91+
'resources/jsonrpc/services.php' => 'config/autoload/services.php',
9192
],
9293
],
9394
3 => [
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
return [
3+
'consumers' => [
4+
[
5+
// The service name, this name should as same as with the name of service provider.
6+
'name' => 'YourServiceName',
7+
// The service registry, if `nodes` is missing below, then you should provide this configs.
8+
'registry' => [
9+
'protocol' => 'consul',
10+
'address' => 'Enter the address of service registry',
11+
],
12+
// If `registry` is missing, then you should provide the nodes configs.
13+
'nodes' => [
14+
// Provide the host and port of the service provider.
15+
// ['host' => 'The host of the service provider', 'port' => 9502]
16+
],
17+
],
18+
],
19+
];

0 commit comments

Comments
 (0)