A gRPC based transport implementation.

CloneableInstantiable
ExtendsGrpc\BaseStub
ImplementsGoogle\ApiCore\Transport\TransportInterface
Methods
public __construct( $hostname, $opts, ?Grpc\Channel $channel = NULL, array $interceptors = [])
 


  • throws Exception
public static build( $apiEndpoint, array $config = [])
 
Builds a GrpcTransport.

public Grpc\BaseStub::close()
 
Close the communication channel associated with this stub.

public Grpc\BaseStub::getConnectivityState( $try_to_connect = false)
 


  • return int The grpc connectivity state
public static Grpc\BaseStub::getDefaultChannel( $hostname, array $opts)
 
Creates and returns the default Channel

  • return Channel The channel
public Grpc\BaseStub::getTarget()
 


  • return string The URI of the endpoint
public startBidiStreamingCall(Google\ApiCore\Call $call, array $options)
 
{@inheritdoc}

public startClientStreamingCall(Google\ApiCore\Call $call, array $options)
 
{@inheritdoc}

public startServerStreamingCall(Google\ApiCore\Call $call, array $options)
 
{@inheritdoc}

public startUnaryCall(Google\ApiCore\Call $call, array $options)
 
{@inheritdoc}

public static validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
public static validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
public Grpc\BaseStub::waitForReady( $timeout)
 


  • return bool true if channel is ready
  • throws Exception if channel is in FATAL_ERROR state
Methods
protected Grpc\BaseStub::_bidiRequest( $method, $deserialize, array $metadata = [], array $options = [])
 
Call a remote method with messages streaming in both directions.

  • return BidiStreamingCall The active call object
protected Grpc\BaseStub::_clientStreamRequest( $method, $deserialize, array $metadata = [], array $options = [])
 
Call a remote method that takes a stream of arguments and has a single output.

  • return ClientStreamingCall The active call object
protected Grpc\BaseStub::_serverStreamRequest( $method, $argument, $deserialize, array $metadata = [], array $options = [])
 
Call a remote method that takes a single argument and returns a stream of responses.

  • return ServerStreamingCall The active call object
protected Grpc\BaseStub::_simpleRequest( $method, $argument, $deserialize, array $metadata = [], array $options = [])
 
Call a remote method that takes a single argument and has a single output.

  • return UnaryCall The active call object
Properties
private static $defaultPort
Methods
private Grpc\BaseStub::_checkConnectivityState( $new_state)
 


  • return bool true if state is CHANNEL_READY
  • throws Exception if state is CHANNEL_FATAL_FAILURE
private Grpc\BaseStub::_get_jwt_aud_uri( $method)
 
constructs the auth uri for the jwt.

  • return string The URL string
private Grpc\BaseStub::_GrpcStreamStream( $channel)
 
Create a function which can be used to create BidiStreamingCall

  • return Closure
private Grpc\BaseStub::_GrpcStreamUnary( $channel)
 
Create a function which can be used to create ServerStreamingCall

  • return Closure
private Grpc\BaseStub::_GrpcUnaryStream( $channel)
 
Create a function which can be used to create ClientStreamingCall

  • return Closure
private Grpc\BaseStub::_GrpcUnaryUnary( $channel)
 
Create a function which can be used to create UnaryCall

  • return Closure
private Grpc\BaseStub::_StreamStreamCallFactory( $channel)
 
Create a function which can be used to create BidiStreamingCall

  • return Closure
private Grpc\BaseStub::_StreamUnaryCallFactory( $channel)
 
Create a function which can be used to create ClientStreamingCall

  • return Closure
private Grpc\BaseStub::_UnaryStreamCallFactory( $channel)
 
Create a function which can be used to create ServerStreamingCall

  • return Closure
private Grpc\BaseStub::_UnaryUnaryCallFactory( $channel)
 
Create a function which can be used to create UnaryCall

  • return Closure
private Grpc\BaseStub::_validate_and_normalize_metadata( $metadata)
 
validate and normalize the metadata array.

  • return array $metadata Validated and key-normalized metadata map
  • throws InvalidArgumentException if key contains invalid characters
private getCallOptions(array $options)
private static getGrpcDependencyStatus()
 


  • return bool
private static normalizeServiceAddress( $apiEndpoint)
 


  • return array
  • throws ValidationException
private static Grpc\BaseStub::updateOpts( $opts)
private static validateFileExists( $filePath)
 


  • throws ValidationException
private static validateGrpcSupport()
 


  • throws ValidationException
private static validateImpl( $arr, $requiredKeys, $allowNull)
Properties
private static $defaultPort
Methods
public static build( $apiEndpoint, array $config = [])
 
Builds a GrpcTransport.

public static Grpc\BaseStub::getDefaultChannel( $hostname, array $opts)
 
Creates and returns the default Channel

  • return Channel The channel
private static getGrpcDependencyStatus()
 


  • return bool
private static normalizeServiceAddress( $apiEndpoint)
 


  • return array
  • throws ValidationException
private static Grpc\BaseStub::updateOpts( $opts)
public static validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
private static validateFileExists( $filePath)
 


  • throws ValidationException
private static validateGrpcSupport()
 


  • throws ValidationException
private static validateImpl( $arr, $requiredKeys, $allowNull)
public static validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only