services.php 969 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. return [
  12. 'consumers' => [
  13. [
  14. // The service name, this name should as same as with the name of service provider.
  15. 'name' => 'YourServiceName',
  16. // The service registry, if `nodes` is missing below, then you should provide this configs.
  17. 'registry' => [
  18. 'protocol' => 'consul',
  19. 'address' => 'Enter the address of service registry',
  20. ],
  21. // If `registry` is missing, then you should provide the nodes configs.
  22. 'nodes' => [
  23. // Provide the host and port of the service provider.
  24. // ['host' => 'The host of the service provider', 'port' => 9502]
  25. ],
  26. ],
  27. ],
  28. ];