Base class for generated client stubs. Stub methods are expected to call _simpleRequest or _streamRequest and return the result.

CloneableInstantiable
Methods
public __construct( $hostname, $opts, $channel = NULL)
 


    public close()
     
    Close the communication channel associated with this stub.

    public getConnectivityState( $try_to_connect = false)
     


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

    • return Channel The channel
    public getTarget()
     


    • return string The URI of the endpoint
    public waitForReady( $timeout)
     


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

    protected _clientStreamRequest( $method, $deserialize, array $metadata = [], array $options = [])
     
    Call a remote method that takes a stream of arguments and has a single output.

    protected _serverStreamRequest( $method, $argument, $deserialize, array $metadata = [], array $options = [])
     
    Call a remote method that takes a single argument and returns a stream of responses.

    protected _simpleRequest( $method, $argument, $deserialize, array $metadata = [], array $options = [])
     
    Call a remote method that takes a single argument and has a single output.

    Properties
    private $call_invoker
    private $channel
    private $hostname
    private $hostname_override
    private $update_metadata
    Methods
    private _checkConnectivityState( $new_state)
     


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

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

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

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

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

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

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

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

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

    • return Closure
    private _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 static updateOpts( $opts)
    Methods
    public static getDefaultChannel( $hostname, array $opts)
     
    Creates and returns the default Channel

    • return Channel The channel
    private static updateOpts( $opts)
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only