2017 © Pedro Peláez
 

library grpc_client

grpc_client

image

caibao/grpc_client

grpc_client

  • Wednesday, July 25, 2018
  • by lat751608899
  • Repository
  • 2 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

What is it

GrpcClient is a php client for grpc server depend on grpc_php_plugin. Making it easier for you to use grpc services., (*1)

Requirement

  1. PHP >= 5.6
  2. Composer
  3. grpc extension
  4. protoc(protobuf compiler)
  5. google/protobuf(protobuf runtime library package)
  6. grpc_php_plugin(PHP Protoc Plugin): Generates PHP gRPC service interface out of Protobuf IDL

Installation

composer require lat/grpcClient

Install protoc

  1. download the protoc binaries from the protocol buffers GitHub repository. Then unzip this file and Update the environment variable PATH to include the path to the protoc binary file.
  2. compile protoc from source
$ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
$ cd grpc
$ git submodule update --init
$ cd grpc/third_party/protobuf
$ ./autogen.sh && ./configure && make
$ sudo make install

Install PHP Protoc Plugin

$ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
$ cd grpc
$ git submodule update --init
$ make grpc_php_plugin

Compile proto file

# write the path of grpc_php_plugin
$ vim plugin.conf
$ ./create_client.sh

Usage

$clinet = GrpcServer\ClientFactory::createClient('sms.SMS', 'develop');
$clinet->SendVerificationCode();

The Versions

25/07 2018

dev-master

9999999-dev

grpc_client

  Sources   Download

MIT

The Requires

 

by Avatar vivi

25/06 2018

1.0.0

1.0.0.0

grpc_client

  Sources   Download

MIT

The Requires

 

by Avatar vivi