CoordinationServiceClient.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. // GENERATED CODE -- DO NOT EDIT!
  3. namespace Ydb\Coordination\V1;
  4. /**
  5. */
  6. class CoordinationServiceClient extends \Grpc\BaseStub {
  7. /**
  8. * @param string $hostname hostname
  9. * @param array $opts channel options
  10. * @param \Grpc\Channel $channel (optional) re-use channel object
  11. */
  12. public function __construct($hostname, $opts, $channel = null) {
  13. parent::__construct($hostname, $opts, $channel);
  14. }
  15. /**
  16. * *
  17. * Bidirectional stream used to establish a session with a coordination node
  18. *
  19. * Relevant APIs for managing semaphores, distributed locking, creating or
  20. * restoring a previously established session are described using nested
  21. * messages in SessionRequest and SessionResponse. Session is established
  22. * with a specific coordination node (previously created using CreateNode
  23. * below) and semaphores are local to that coordination node.
  24. * @param array $metadata metadata
  25. * @param array $options call options
  26. * @return \Grpc\BidiStreamingCall
  27. */
  28. public function Session($metadata = [], $options = []) {
  29. return $this->_bidiRequest('/Ydb.Coordination.V1.CoordinationService/Session',
  30. ['\Ydb\Coordination\SessionResponse','decode'],
  31. $metadata, $options);
  32. }
  33. /**
  34. * Creates a new coordination node
  35. * @param \Ydb\Coordination\CreateNodeRequest $argument input argument
  36. * @param array $metadata metadata
  37. * @param array $options call options
  38. * @return \Grpc\UnaryCall
  39. */
  40. public function CreateNode(\Ydb\Coordination\CreateNodeRequest $argument,
  41. $metadata = [], $options = []) {
  42. return $this->_simpleRequest('/Ydb.Coordination.V1.CoordinationService/CreateNode',
  43. $argument,
  44. ['\Ydb\Coordination\CreateNodeResponse', 'decode'],
  45. $metadata, $options);
  46. }
  47. /**
  48. * Modifies settings of a coordination node
  49. * @param \Ydb\Coordination\AlterNodeRequest $argument input argument
  50. * @param array $metadata metadata
  51. * @param array $options call options
  52. * @return \Grpc\UnaryCall
  53. */
  54. public function AlterNode(\Ydb\Coordination\AlterNodeRequest $argument,
  55. $metadata = [], $options = []) {
  56. return $this->_simpleRequest('/Ydb.Coordination.V1.CoordinationService/AlterNode',
  57. $argument,
  58. ['\Ydb\Coordination\AlterNodeResponse', 'decode'],
  59. $metadata, $options);
  60. }
  61. /**
  62. * Drops a coordination node
  63. * @param \Ydb\Coordination\DropNodeRequest $argument input argument
  64. * @param array $metadata metadata
  65. * @param array $options call options
  66. * @return \Grpc\UnaryCall
  67. */
  68. public function DropNode(\Ydb\Coordination\DropNodeRequest $argument,
  69. $metadata = [], $options = []) {
  70. return $this->_simpleRequest('/Ydb.Coordination.V1.CoordinationService/DropNode',
  71. $argument,
  72. ['\Ydb\Coordination\DropNodeResponse', 'decode'],
  73. $metadata, $options);
  74. }
  75. /**
  76. * Describes a coordination node
  77. * @param \Ydb\Coordination\DescribeNodeRequest $argument input argument
  78. * @param array $metadata metadata
  79. * @param array $options call options
  80. * @return \Grpc\UnaryCall
  81. */
  82. public function DescribeNode(\Ydb\Coordination\DescribeNodeRequest $argument,
  83. $metadata = [], $options = []) {
  84. return $this->_simpleRequest('/Ydb.Coordination.V1.CoordinationService/DescribeNode',
  85. $argument,
  86. ['\Ydb\Coordination\DescribeNodeResponse', 'decode'],
  87. $metadata, $options);
  88. }
  89. }