Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion installer/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
'hyperf/tracer' => [
'version' => '~1.0.0',
],
'hyperf/service-governance' => [
'version' => '~1.0.0',
],
],
'require-dev' => [
],
Expand All @@ -65,17 +68,30 @@
'custom-package' => true,
'options' => [
1 => [
'name' => 'JSON-RPC',
'name' => 'JSON-RPC with Service Governance',
'packages' => [
'hyperf/json-rpc',
'hyperf/rpc',
'hyperf/rpc-client',
'hyperf/rpc-server',
'hyperf/service-governance',
],
'resources' => [
],
],
2 => [
'name' => 'JSON-RPC',
'packages' => [
'hyperf/json-rpc',
'hyperf/rpc',
'hyperf/rpc-client',
'hyperf/rpc-server',
],
'resources' => [
'resources/jsonrpc/services.php' => 'config/autoload/services.php',
],
],
3 => [
'name' => 'gRPC',
'packages' => [
'hyperf/grpc-client',
Expand Down
19 changes: 19 additions & 0 deletions installer/resources/jsonrpc/services.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
return [
'consumers' => [
[
// The service name, this name should as same as with the name of service provider.
'name' => 'YourServiceName',
// The service registry, if `nodes` is missing below, then you should provide this configs.
'registry' => [
'protocol' => 'consul',
'address' => 'Enter the address of service registry',
],
// If `registry` is missing, then you should provide the nodes configs.
'nodes' => [
// Provide the host and port of the service provider.
// ['host' => 'The host of the service provider', 'port' => 9502]
],
],
],
];