Skip to content

Commit 519e55d

Browse files
authored
Merge pull request #3 from huangzhhui/master
Added a new seletion of rpc, JSON-RPC with Service Governance
2 parents bd81f16 + 778bc38 commit 519e55d

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

installer/config.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
'hyperf/tracer' => [
5555
'version' => '~1.0.0',
5656
],
57+
'hyperf/service-governance' => [
58+
'version' => '~1.0.0',
59+
],
5760
],
5861
'require-dev' => [
5962
],
@@ -65,17 +68,30 @@
6568
'custom-package' => true,
6669
'options' => [
6770
1 => [
68-
'name' => 'JSON-RPC',
71+
'name' => 'JSON-RPC with Service Governance',
6972
'packages' => [
7073
'hyperf/json-rpc',
7174
'hyperf/rpc',
7275
'hyperf/rpc-client',
7376
'hyperf/rpc-server',
77+
'hyperf/service-governance',
7478
],
7579
'resources' => [
7680
],
7781
],
7882
2 => [
83+
'name' => 'JSON-RPC',
84+
'packages' => [
85+
'hyperf/json-rpc',
86+
'hyperf/rpc',
87+
'hyperf/rpc-client',
88+
'hyperf/rpc-server',
89+
],
90+
'resources' => [
91+
'resources/jsonrpc/services.php' => 'config/autoload/services.php',
92+
],
93+
],
94+
3 => [
7995
'name' => 'gRPC',
8096
'packages' => [
8197
'hyperf/grpc-client',
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)