コード例 #1
0
ファイル: client.py プロジェクト: th3w4y/gcloud-python
    def _make_data_stub(self):
        """Creates gRPC stub to make requests to the Data API.

        :rtype: :class:`grpc.beta._stub._AutoIntermediary`
        :returns: A gRPC stub object.
        """
        return make_stub(self.credentials, self.user_agent,
                         DATA_STUB_FACTORY_V2, DATA_API_HOST_V2,
                         DATA_API_PORT_V2)
コード例 #2
0
ファイル: client.py プロジェクト: th3w4y/gcloud-python
    def _make_table_stub(self):
        """Creates gRPC stub to make requests to the Table Admin API.

        :rtype: :class:`grpc.beta._stub._AutoIntermediary`
        :returns: A gRPC stub object.
        """
        return make_stub(self.credentials, self.user_agent,
                         TABLE_STUB_FACTORY_V2, TABLE_ADMIN_HOST_V2,
                         TABLE_ADMIN_PORT_V2)
コード例 #3
0
ファイル: client.py プロジェクト: th3w4y/gcloud-python
    def _make_operations_stub(self):
        """Creates gRPC stub to make requests to the Operations API.

        These are for long-running operations of the Instance Admin API,
        hence the host and port matching.

        :rtype: :class:`grpc.beta._stub._AutoIntermediary`
        :returns: A gRPC stub object.
        """
        return make_stub(self.credentials, self.user_agent,
                         OPERATIONS_STUB_FACTORY_V2, OPERATIONS_API_HOST_V2,
                         OPERATIONS_API_PORT_V2)
コード例 #4
0
ファイル: client.py プロジェクト: yang-g/gcloud-python
def _make_instance_stub(client):
    """Creates gRPC stub to make requests to the Instance Admin API.

    :type client: :class:`Client`
    :param client: The client that will hold the stub.

    :rtype: :class:`.bigtable_instance_admin_pb2.BigtableInstanceAdminStub`
    :returns: A gRPC stub object.
    """
    return make_stub(client.credentials, client.user_agent,
                     bigtable_instance_admin_pb2.BigtableInstanceAdminStub,
                     INSTANCE_ADMIN_HOST, INSTANCE_ADMIN_PORT)
コード例 #5
0
ファイル: client.py プロジェクト: yang-g/gcloud-python
def _make_data_stub(client):
    """Creates gRPC stub to make requests to the Data API.

    :type client: :class:`Client`
    :param client: The client that will hold the stub.

    :rtype: :class:`._generated.bigtable_pb2.BigtableStub`
    :returns: A gRPC stub object.
    """
    return make_stub(client.credentials, client.user_agent,
                     bigtable_pb2.BigtableStub,
                     DATA_API_HOST, DATA_API_PORT)
コード例 #6
0
ファイル: client.py プロジェクト: yang-g/gcloud-python
def _make_operations_stub(client):
    """Creates gRPC stub to make requests to the Operations API.

    These are for long-running operations of the Instance Admin API,
    hence the host and port matching.

    :type client: :class:`Client`
    :param client: The client that will hold the stub.

    :rtype: :class:`._generated.operations_grpc_pb2.OperationsStub`
    :returns: A gRPC stub object.
    """
    return make_stub(client.credentials, client.user_agent,
                     operations_grpc_pb2.OperationsStub,
                     OPERATIONS_API_HOST, OPERATIONS_API_PORT)
コード例 #7
0
ファイル: test__helpers.py プロジェクト: th3w4y/gcloud-python
 def _callFUT(self, *args, **kwargs):
     from gcloud._helpers import make_stub
     return make_stub(*args, **kwargs)
コード例 #8
0
 def _callFUT(self, *args, **kwargs):
     from gcloud._helpers import make_stub
     return make_stub(*args, **kwargs)
コード例 #9
0
ファイル: connection.py プロジェクト: yang-g/gcloud-python
 def __init__(self, connection):
     self._stub = make_stub(connection.credentials, connection.USER_AGENT,
                            datastore_grpc_pb2.DatastoreStub,
                            DATASTORE_API_HOST, DATASTORE_API_PORT)