GcpExtensionChannel maintains an array of channels for certain API.

CloneableInstantiable
Properties
public $affinity_by_method
public $affinity_conf
public $affinity_key_to_channel_ref
public $channel_refs
public $credentials
public $max_concurrent_streams_low_watermark
public $max_size
public $options
public $target
Methods
public __construct( $hostname = NULL, $opts = [])
 


    public bind( $channel_ref, $affinity_key)
     
    Bind the ChannelRef with the affinity key. This is a private method.

    public close()
     
    Close the channel

    public cmp_by_active_stream_ref( $a, $b)
    public getChannelRef( $affinity_key = NULL)
     
    Pick or create a ChannelRef from the pool by affinity key.

    public getChannelRefs()
     


    • return array An array of ChannelRefs created for certain API.
    public getConnectivityState( $try_to_connect = false)
     
    Get the connectivity state of the channel

    • return int The grpc connectivity state
    • throws InvalidArgumentException
    public getTarget()
     
    Get the endpoint this call/stream is connected to

    • return string The URI of the endpoint
    public unbind( $affinity_key)
     
    Unbind the affinity key. This is a private method.

    public updateOpts( $opts)
     


      public watchConnectivityState( $last_state, $deadline_obj = NULL)
       
      Watch the connectivity state of the channel until it changed

      • return bool If the connectivity state changes from last_state before deadline
      • throws InvalidArgumentException
      Properties
      private $is_closed
      © 2020 Bruce Wells
      Search Namespaces \ Classes
      ConfigurationNumbers (0-9.) only