def beta_create_Store_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('store.Store', 'AddItem'): AddItemRequest.FromString,
      ('store.Store', 'AddItems'): AddItemRequest.FromString,
      ('store.Store', 'ListInventory'): Empty.FromString,
      ('store.Store', 'QueryQuantities'): QueryItemRequest.FromString,
      ('store.Store', 'QueryQuantity'): QueryItemRequest.FromString,
      ('store.Store', 'RemoveItem'): RemoveItemRequest.FromString,
      ('store.Store', 'RemoveItems'): RemoveItemRequest.FromString,
    }
    response_serializers = {
      ('store.Store', 'AddItem'): Empty.SerializeToString,
      ('store.Store', 'AddItems'): Empty.SerializeToString,
      ('store.Store', 'ListInventory'): QuantityResponse.SerializeToString,
      ('store.Store', 'QueryQuantities'): QuantityResponse.SerializeToString,
      ('store.Store', 'QueryQuantity'): QuantityResponse.SerializeToString,
      ('store.Store', 'RemoveItem'): RemoveItemResponse.SerializeToString,
      ('store.Store', 'RemoveItems'): RemoveItemResponse.SerializeToString,
    }
    method_implementations = {
      ('store.Store', 'AddItem'): face_utilities.unary_unary_inline(servicer.AddItem),
      ('store.Store', 'AddItems'): face_utilities.stream_unary_inline(servicer.AddItems),
      ('store.Store', 'ListInventory'): face_utilities.unary_stream_inline(servicer.ListInventory),
      ('store.Store', 'QueryQuantities'): face_utilities.stream_stream_inline(servicer.QueryQuantities),
      ('store.Store', 'QueryQuantity'): face_utilities.unary_unary_inline(servicer.QueryQuantity),
      ('store.Store', 'RemoveItem'): face_utilities.unary_unary_inline(servicer.RemoveItem),
      ('store.Store', 'RemoveItems'): face_utilities.stream_unary_inline(servicer.RemoveItems),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)
Example #2
0
    def beta_create_Fileservice_server(servicer,
                                       pool=None,
                                       pool_size=None,
                                       default_timeout=None,
                                       maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('Fileservice', 'DownloadFile'): FileInfo.FromString,
            ('Fileservice', 'FileDelete'): FileInfo.FromString,
            ('Fileservice', 'FileList'): UserInfo.FromString,
            ('Fileservice', 'FileSearch'): FileInfo.FromString,
            ('Fileservice', 'ReplicateFile'): FileData.FromString,
            ('Fileservice', 'UpdateFile'): FileData.FromString,
            ('Fileservice', 'UploadFile'): FileData.FromString,
            ('Fileservice', 'metadataUpdate'): metadataInfo.FromString,
        }
        response_serializers = {
            ('Fileservice', 'DownloadFile'): FileData.SerializeToString,
            ('Fileservice', 'FileDelete'): ack.SerializeToString,
            ('Fileservice', 'FileList'): FileListResponse.SerializeToString,
            ('Fileservice', 'FileSearch'): ack.SerializeToString,
            ('Fileservice', 'ReplicateFile'): ack.SerializeToString,
            ('Fileservice', 'UpdateFile'): ack.SerializeToString,
            ('Fileservice', 'UploadFile'): ack.SerializeToString,
            ('Fileservice', 'metadataUpdate'): ack.SerializeToString,
        }
        method_implementations = {
            ('Fileservice', 'DownloadFile'):
            face_utilities.unary_stream_inline(servicer.DownloadFile),
            ('Fileservice', 'FileDelete'):
            face_utilities.unary_unary_inline(servicer.FileDelete),
            ('Fileservice', 'FileList'):
            face_utilities.unary_unary_inline(servicer.FileList),
            ('Fileservice', 'FileSearch'):
            face_utilities.unary_unary_inline(servicer.FileSearch),
            ('Fileservice', 'ReplicateFile'):
            face_utilities.stream_unary_inline(servicer.ReplicateFile),
            ('Fileservice', 'UpdateFile'):
            face_utilities.stream_unary_inline(servicer.UpdateFile),
            ('Fileservice', 'UploadFile'):
            face_utilities.stream_unary_inline(servicer.UploadFile),
            ('Fileservice', 'metadataUpdate'):
            face_utilities.unary_unary_inline(servicer.metadataUpdate),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #3
0
    def beta_create_Agent_server(servicer,
                                 pool=None,
                                 pool_size=None,
                                 default_timeout=None,
                                 maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('lbackgrpc.Agent', 'DoBackup'):
            shared__pb2.BackupCmdStream.FromString,
            ('lbackgrpc.Agent', 'DoRelocateGive'):
            shared__pb2.RelocateCmdGiveStream.FromString,
            ('lbackgrpc.Agent', 'DoRelocateTake'):
            shared__pb2.RelocateCmdTake.FromString,
            ('lbackgrpc.Agent', 'DoRestore'):
            shared__pb2.RestoreCmd.FromString,
            ('lbackgrpc.Agent', 'DoRm'):
            shared__pb2.RmCmd.FromString,
        }
        response_serializers = {
            ('lbackgrpc.Agent', 'DoBackup'):
            shared__pb2.BackupCmdStatus.SerializeToString,
            ('lbackgrpc.Agent', 'DoRelocateGive'):
            shared__pb2.RelocateCmdGiveStatus.SerializeToString,
            ('lbackgrpc.Agent', 'DoRelocateTake'):
            shared__pb2.RelocateCmdTakeStatus.SerializeToString,
            ('lbackgrpc.Agent', 'DoRestore'):
            shared__pb2.RestoreCmdStatus.SerializeToString,
            ('lbackgrpc.Agent', 'DoRm'):
            shared__pb2.RmCmdStatus.SerializeToString,
        }
        method_implementations = {
            ('lbackgrpc.Agent', 'DoBackup'):
            face_utilities.stream_unary_inline(servicer.DoBackup),
            ('lbackgrpc.Agent', 'DoRelocateGive'):
            face_utilities.stream_unary_inline(servicer.DoRelocateGive),
            ('lbackgrpc.Agent', 'DoRelocateTake'):
            face_utilities.unary_stream_inline(servicer.DoRelocateTake),
            ('lbackgrpc.Agent', 'DoRestore'):
            face_utilities.unary_stream_inline(servicer.DoRestore),
            ('lbackgrpc.Agent', 'DoRm'):
            face_utilities.unary_unary_inline(servicer.DoRm),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
 def beta_create_MonsterStorage_server(servicer,
                                       pool=None,
                                       pool_size=None,
                                       default_timeout=None,
                                       maximum_timeout=None):
     """The Beta API is deprecated for 0.15.0 and later.
 
 It is recommended to use the GA API (classes and functions in this
 file not marked beta) for all further purposes. This function was
 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
     method_implementations = {
         ('MyGame.Example.MonsterStorage', 'GetMaxHitPoint'):
         face_utilities.stream_unary_inline(servicer.GetMaxHitPoint),
         ('MyGame.Example.MonsterStorage', 'GetMinMaxHitPoints'):
         face_utilities.unary_unary_inline(servicer.GetMinMaxHitPoints),
         ('MyGame.Example.MonsterStorage', 'Retrieve'):
         face_utilities.unary_stream_inline(servicer.Retrieve),
         ('MyGame.Example.MonsterStorage', 'Store'):
         face_utilities.unary_unary_inline(servicer.Store),
     }
     server_options = beta_implementations.server_options(
         thread_pool=pool,
         thread_pool_size=pool_size,
         default_timeout=default_timeout,
         maximum_timeout=maximum_timeout)
     return beta_implementations.server(method_implementations,
                                        options=server_options)
Example #5
0
def beta_create_RouteGuide_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  request_deserializers = {
    ('routeguide.RouteGuide', 'GetFeature'): route_guide_pb2.Point.FromString,
    ('routeguide.RouteGuide', 'ListFeatures'): route_guide_pb2.Rectangle.FromString,
    ('routeguide.RouteGuide', 'RecordRoute'): route_guide_pb2.Point.FromString,
    ('routeguide.RouteGuide', 'RouteChat'): route_guide_pb2.RouteNote.FromString,
  }
  response_serializers = {
    ('routeguide.RouteGuide', 'GetFeature'): route_guide_pb2.Feature.SerializeToString,
    ('routeguide.RouteGuide', 'ListFeatures'): route_guide_pb2.Feature.SerializeToString,
    ('routeguide.RouteGuide', 'RecordRoute'): route_guide_pb2.RouteSummary.SerializeToString,
    ('routeguide.RouteGuide', 'RouteChat'): route_guide_pb2.RouteNote.SerializeToString,
  }
  method_implementations = {
    ('routeguide.RouteGuide', 'GetFeature'): face_utilities.unary_unary_inline(servicer.GetFeature),
    ('routeguide.RouteGuide', 'ListFeatures'): face_utilities.unary_stream_inline(servicer.ListFeatures),
    ('routeguide.RouteGuide', 'RecordRoute'): face_utilities.stream_unary_inline(servicer.RecordRoute),
    ('routeguide.RouteGuide', 'RouteChat'): face_utilities.stream_stream_inline(servicer.RouteChat),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
Example #6
0
  def setUp(self):
    self._servicer = _Servicer()
    self._method_implementations = {
        (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
        (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
        (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
        (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
    }

    self._cardinalities = {
        _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
        _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
        _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
        _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
    }

    self._server_options = implementations.server_options(
        thread_pool_size=test_constants.POOL_SIZE)
    self._server_credentials = implementations.ssl_server_credentials(
        [(resources.private_key(), resources.certificate_chain(),),])
    self._client_credentials = implementations.ssl_client_credentials(
        resources.test_root_certificates(), None, None)
    self._stub_options = implementations.stub_options(
        thread_pool_size=test_constants.POOL_SIZE)
Example #7
0
def beta_create_JobUpload_server(servicer,
                                 pool=None,
                                 pool_size=None,
                                 default_timeout=None,
                                 maximum_timeout=None):
    request_deserializers = {
        ('JobUpload', 'param'): parameters.FromString,
        ('JobUpload', 'upload'): line.FromString,
    }
    response_serializers = {
        ('JobUpload', 'param'): Status.SerializeToString,
        ('JobUpload', 'upload'): Status.SerializeToString,
    }
    method_implementations = {
        ('JobUpload', 'param'):
        face_utilities.unary_unary_inline(servicer.param),
        ('JobUpload', 'upload'):
        face_utilities.stream_unary_inline(servicer.upload),
    }
    server_options = beta_implementations.server_options(
        request_deserializers=request_deserializers,
        response_serializers=response_serializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
        default_timeout=default_timeout,
        maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations,
                                       options=server_options)
Example #8
0
  def beta_create_RouteGuide_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('routeguide.RouteGuide', 'GetFeature'): Point.FromString,
      ('routeguide.RouteGuide', 'ListFeatures'): Rectangle.FromString,
      ('routeguide.RouteGuide', 'RecordRoute'): Point.FromString,
      ('routeguide.RouteGuide', 'RouteChat'): RouteNote.FromString,
    }
    response_serializers = {
      ('routeguide.RouteGuide', 'GetFeature'): Feature.SerializeToString,
      ('routeguide.RouteGuide', 'ListFeatures'): Feature.SerializeToString,
      ('routeguide.RouteGuide', 'RecordRoute'): RouteSummary.SerializeToString,
      ('routeguide.RouteGuide', 'RouteChat'): RouteNote.SerializeToString,
    }
    method_implementations = {
      ('routeguide.RouteGuide', 'GetFeature'): face_utilities.unary_unary_inline(servicer.GetFeature),
      ('routeguide.RouteGuide', 'ListFeatures'): face_utilities.unary_stream_inline(servicer.ListFeatures),
      ('routeguide.RouteGuide', 'RecordRoute'): face_utilities.stream_unary_inline(servicer.RecordRoute),
      ('routeguide.RouteGuide', 'RouteChat'): face_utilities.stream_stream_inline(servicer.RouteChat),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)
Example #9
0
    def beta_create_FeatureExtraction_server(servicer,
                                             pool=None,
                                             pool_size=None,
                                             default_timeout=None,
                                             maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('FeatureExtraction', 'processVideo'): Image.FromString,
        }
        response_serializers = {
            ('FeatureExtraction', 'processVideo'): Response.SerializeToString,
        }
        method_implementations = {
            ('FeatureExtraction', 'processVideo'):
            face_utilities.stream_unary_inline(servicer.processVideo),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #10
0
    def setUp(self):
        self._servicer = _Servicer()
        self._method_implementations = {
            (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
            (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
            (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
            (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
        }

        self._cardinalities = {
            _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
            _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
            _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
            _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
        }

        self._server_options = implementations.server_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._server_credentials = implementations.ssl_server_credentials([
            (
                resources.private_key(),
                resources.certificate_chain(),
            ),
        ])
        self._channel_credentials = implementations.ssl_channel_credentials(
            resources.test_root_certificates())
        self._stub_options = implementations.stub_options(
            thread_pool_size=test_constants.POOL_SIZE)
Example #11
0
def beta_create_BfKvService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  request_deserializers = {
    ('bfkv.BfKvService', 'GetKv'): bfgateway__pb2.BfKvData.FromString,
    ('bfkv.BfKvService', 'Ping'): bfgateway__pb2.BfPingData.FromString,
    ('bfkv.BfKvService', 'PingStreamC'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'PingStreamCS'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'PingStreamS'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'SetKv'): bfgateway__pb2.BfKvData.FromString,
  }
  response_serializers = {
    ('bfkv.BfKvService', 'GetKv'): bfgateway__pb2.BfKvData.SerializeToString,
    ('bfkv.BfKvService', 'Ping'): bfgateway__pb2.BfPingData.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamC'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamCS'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamS'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'SetKv'): bfgateway__pb2.BfVoid.SerializeToString,
  }
  method_implementations = {
    ('bfkv.BfKvService', 'GetKv'): face_utilities.unary_unary_inline(servicer.GetKv),
    ('bfkv.BfKvService', 'Ping'): face_utilities.unary_unary_inline(servicer.Ping),
    ('bfkv.BfKvService', 'PingStreamC'): face_utilities.stream_unary_inline(servicer.PingStreamC),
    ('bfkv.BfKvService', 'PingStreamCS'): face_utilities.stream_stream_inline(servicer.PingStreamCS),
    ('bfkv.BfKvService', 'PingStreamS'): face_utilities.unary_stream_inline(servicer.PingStreamS),
    ('bfkv.BfKvService', 'SetKv'): face_utilities.unary_unary_inline(servicer.SetKv),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
Example #12
0
  def beta_create_Hello_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('grpcresolver.hello.Hello', 'Greeter'): HelloRequest.FromString,
      ('grpcresolver.hello.Hello', 'GreeterResponseStream'): HelloRequest.FromString,
      ('grpcresolver.hello.Hello', 'StreamGreeter'): HelloRequest.FromString,
      ('grpcresolver.hello.Hello', 'StreamGreeterResponseStream'): HelloRequest.FromString,
    }
    response_serializers = {
      ('grpcresolver.hello.Hello', 'Greeter'): HelloResponse.SerializeToString,
      ('grpcresolver.hello.Hello', 'GreeterResponseStream'): HelloResponse.SerializeToString,
      ('grpcresolver.hello.Hello', 'StreamGreeter'): HelloResponse.SerializeToString,
      ('grpcresolver.hello.Hello', 'StreamGreeterResponseStream'): HelloResponse.SerializeToString,
    }
    method_implementations = {
      ('grpcresolver.hello.Hello', 'Greeter'): face_utilities.unary_unary_inline(servicer.Greeter),
      ('grpcresolver.hello.Hello', 'GreeterResponseStream'): face_utilities.unary_stream_inline(servicer.GreeterResponseStream),
      ('grpcresolver.hello.Hello', 'StreamGreeter'): face_utilities.stream_unary_inline(servicer.StreamGreeter),
      ('grpcresolver.hello.Hello', 'StreamGreeterResponseStream'): face_utilities.stream_stream_inline(servicer.StreamGreeterResponseStream),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)
Example #13
0
  def beta_create_StockHQService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('stock_hq.StockHQService', 'QA_fetch_p2p'): query_struct.FromString,
      ('stock_hq.StockHQService', 'QA_fetch_p2s'): query_struct.FromString,
      ('stock_hq.StockHQService', 'QA_fetch_s2p'): query_struct.FromString,
      ('stock_hq.StockHQService', 'QA_fetch_s2s'): query_struct.FromString,
    }
    response_serializers = {
      ('stock_hq.StockHQService', 'QA_fetch_p2p'): hq_struct.SerializeToString,
      ('stock_hq.StockHQService', 'QA_fetch_p2s'): hq_struct.SerializeToString,
      ('stock_hq.StockHQService', 'QA_fetch_s2p'): hq_struct.SerializeToString,
      ('stock_hq.StockHQService', 'QA_fetch_s2s'): hq_struct.SerializeToString,
    }
    method_implementations = {
      ('stock_hq.StockHQService', 'QA_fetch_p2p'): face_utilities.unary_unary_inline(servicer.QA_fetch_p2p),
      ('stock_hq.StockHQService', 'QA_fetch_p2s'): face_utilities.unary_stream_inline(servicer.QA_fetch_p2s),
      ('stock_hq.StockHQService', 'QA_fetch_s2p'): face_utilities.stream_unary_inline(servicer.QA_fetch_s2p),
      ('stock_hq.StockHQService', 'QA_fetch_s2s'): face_utilities.stream_stream_inline(servicer.QA_fetch_s2s),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)
Example #14
0
def beta_create_OwstoniService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  request_deserializers = {
    ('btwan.OwstoniService', 'GetMetadataInfo'): InfoHash.FromString,
    ('btwan.OwstoniService', 'Index'): MetadataInfo.FromString,
    ('btwan.OwstoniService', 'Recv'): Void.FromString,
    ('btwan.OwstoniService', 'Search'): SearchReq.FromString,
    ('btwan.OwstoniService', 'Send'): Event.FromString,
    ('btwan.OwstoniService', 'SendInfoHash'): InfoHash.FromString,
  }
  response_serializers = {
    ('btwan.OwstoniService', 'GetMetadataInfo'): MetadataInfo.SerializeToString,
    ('btwan.OwstoniService', 'Index'): Void.SerializeToString,
    ('btwan.OwstoniService', 'Recv'): Event.SerializeToString,
    ('btwan.OwstoniService', 'Search'): SearchResp.SerializeToString,
    ('btwan.OwstoniService', 'Send'): Void.SerializeToString,
    ('btwan.OwstoniService', 'SendInfoHash'): Void.SerializeToString,
  }
  method_implementations = {
    ('btwan.OwstoniService', 'GetMetadataInfo'): face_utilities.unary_unary_inline(servicer.GetMetadataInfo),
    ('btwan.OwstoniService', 'Index'): face_utilities.unary_unary_inline(servicer.Index),
    ('btwan.OwstoniService', 'Recv'): face_utilities.unary_stream_inline(servicer.Recv),
    ('btwan.OwstoniService', 'Search'): face_utilities.unary_unary_inline(servicer.Search),
    ('btwan.OwstoniService', 'Send'): face_utilities.stream_unary_inline(servicer.Send),
    ('btwan.OwstoniService', 'SendInfoHash'): face_utilities.unary_unary_inline(servicer.SendInfoHash),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
Example #15
0
    def beta_create_TestService_server(servicer,
                                       pool=None,
                                       pool_size=None,
                                       default_timeout=None,
                                       maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('TestService', 'DelayedMethod'): StandardRequest.FromString,
            ('TestService', 'DelayedStream'): StreamRequest.FromString,
            ('TestService', 'ExceptionMethod'): StandardRequest.FromString,
            ('TestService', 'NormalMethod'): StandardRequest.FromString,
            ('TestService', 'StreamInputMethod'): StandardRequest.FromString,
            ('TestService', 'StreamMethod'): StreamRequest.FromString,
            ('TestService', 'StreamStreamMethod'): StandardRequest.FromString,
        }
        response_serializers = {
            ('TestService', 'DelayedMethod'): StandardReply.SerializeToString,
            ('TestService', 'DelayedStream'): StandardReply.SerializeToString,
            ('TestService', 'ExceptionMethod'):
            StandardReply.SerializeToString,
            ('TestService', 'NormalMethod'): StandardReply.SerializeToString,
            ('TestService', 'StreamInputMethod'):
            StreamReply.SerializeToString,
            ('TestService', 'StreamMethod'): StandardReply.SerializeToString,
            ('TestService', 'StreamStreamMethod'):
            StandardReply.SerializeToString,
        }
        method_implementations = {
            ('TestService', 'DelayedMethod'):
            face_utilities.unary_unary_inline(servicer.DelayedMethod),
            ('TestService', 'DelayedStream'):
            face_utilities.unary_stream_inline(servicer.DelayedStream),
            ('TestService', 'ExceptionMethod'):
            face_utilities.unary_unary_inline(servicer.ExceptionMethod),
            ('TestService', 'NormalMethod'):
            face_utilities.unary_unary_inline(servicer.NormalMethod),
            ('TestService', 'StreamInputMethod'):
            face_utilities.stream_unary_inline(servicer.StreamInputMethod),
            ('TestService', 'StreamMethod'):
            face_utilities.unary_stream_inline(servicer.StreamMethod),
            ('TestService', 'StreamStreamMethod'):
            face_utilities.stream_stream_inline(servicer.StreamStreamMethod),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #16
0
  def beta_create_Ingress_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('loggregator.v2.Ingress', 'BatchSender'): EnvelopeBatch.FromString,
      ('loggregator.v2.Ingress', 'Sender'): envelope__pb2.Envelope.FromString,
    }
    response_serializers = {
      ('loggregator.v2.Ingress', 'BatchSender'): BatchSenderResponse.SerializeToString,
      ('loggregator.v2.Ingress', 'Sender'): IngressResponse.SerializeToString,
    }
    method_implementations = {
      ('loggregator.v2.Ingress', 'BatchSender'): face_utilities.stream_unary_inline(servicer.BatchSender),
      ('loggregator.v2.Ingress', 'Sender'): face_utilities.stream_unary_inline(servicer.Sender),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)
Example #17
0
def beta_create_RouteGuide_server(servicer,
                                  pool=None,
                                  pool_size=None,
                                  default_timeout=None,
                                  maximum_timeout=None):
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    request_deserializers = {
        ('routeguide.RouteGuide', 'GetFeature'):
        route_guide_pb2.Point.FromString,
        ('routeguide.RouteGuide', 'ListFeatures'):
        route_guide_pb2.Rectangle.FromString,
        ('routeguide.RouteGuide', 'RecordRoute'):
        route_guide_pb2.Point.FromString,
        ('routeguide.RouteGuide', 'RouteChat'):
        route_guide_pb2.RouteNote.FromString,
    }
    response_serializers = {
        ('routeguide.RouteGuide', 'GetFeature'):
        route_guide_pb2.Feature.SerializeToString,
        ('routeguide.RouteGuide', 'ListFeatures'):
        route_guide_pb2.Feature.SerializeToString,
        ('routeguide.RouteGuide', 'RecordRoute'):
        route_guide_pb2.RouteSummary.SerializeToString,
        ('routeguide.RouteGuide', 'RouteChat'):
        route_guide_pb2.RouteNote.SerializeToString,
    }
    method_implementations = {
        ('routeguide.RouteGuide', 'GetFeature'):
        face_utilities.unary_unary_inline(servicer.GetFeature),
        ('routeguide.RouteGuide', 'ListFeatures'):
        face_utilities.unary_stream_inline(servicer.ListFeatures),
        ('routeguide.RouteGuide', 'RecordRoute'):
        face_utilities.stream_unary_inline(servicer.RecordRoute),
        ('routeguide.RouteGuide', 'RouteChat'):
        face_utilities.stream_stream_inline(servicer.RouteChat),
    }
    server_options = beta_implementations.server_options(
        request_deserializers=request_deserializers,
        response_serializers=response_serializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
        default_timeout=default_timeout,
        maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations,
                                       options=server_options)
Example #18
0
    def beta_create_Hetr_server(servicer,
                                pool=None,
                                pool_size=None,
                                default_timeout=None,
                                maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('Hetr', 'BuildTransformer'): BuildTransformerRequest.FromString,
            ('Hetr', 'Close'): CloseRequest.FromString,
            ('Hetr', 'CloseTransformer'): CloseTransformerRequest.FromString,
            ('Hetr', 'Computation'): ComputationRequest.FromString,
            ('Hetr', 'FeedInput'): FeedInputRequest.FromString,
            ('Hetr', 'GetResults'): GetResultsRequest.FromString,
        }
        response_serializers = {
            ('Hetr', 'BuildTransformer'):
            BuildTransformerReply.SerializeToString,
            ('Hetr', 'Close'): CloseReply.SerializeToString,
            ('Hetr', 'CloseTransformer'):
            CloseTransformerReply.SerializeToString,
            ('Hetr', 'Computation'): ComputationReply.SerializeToString,
            ('Hetr', 'FeedInput'): FeedInputReply.SerializeToString,
            ('Hetr', 'GetResults'): GetResultsReply.SerializeToString,
        }
        method_implementations = {
            ('Hetr', 'BuildTransformer'):
            face_utilities.unary_unary_inline(servicer.BuildTransformer),
            ('Hetr', 'Close'):
            face_utilities.unary_unary_inline(servicer.Close),
            ('Hetr', 'CloseTransformer'):
            face_utilities.unary_unary_inline(servicer.CloseTransformer),
            ('Hetr', 'Computation'):
            face_utilities.stream_unary_inline(servicer.Computation),
            ('Hetr', 'FeedInput'):
            face_utilities.unary_unary_inline(servicer.FeedInput),
            ('Hetr', 'GetResults'):
            face_utilities.unary_unary_inline(servicer.GetResults),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
    def beta_create_RosBridgeService_server(servicer,
                                            pool=None,
                                            pool_size=None,
                                            default_timeout=None,
                                            maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

        It is recommended to use the GA API (classes and functions in this
        file not marked beta) for all further purposes. This function was
        generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('rosbridge_service.RosBridgeService', 'readCommandValues'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            ('rosbridge_service.RosBridgeService', 'readEncoderValues'):
            google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
            ('rosbridge_service.RosBridgeService', 'streamTwistValues'):
            TwistValue.FromString,
            ('rosbridge_service.RosBridgeService', 'writeTwistValue'):
            TwistValue.FromString,
        }
        response_serializers = {
            ('rosbridge_service.RosBridgeService', 'readCommandValues'):
            CommandValue.SerializeToString,
            ('rosbridge_service.RosBridgeService', 'readEncoderValues'):
            EncoderValue.SerializeToString,
            ('rosbridge_service.RosBridgeService', 'streamTwistValues'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('rosbridge_service.RosBridgeService', 'writeTwistValue'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        }
        method_implementations = {
            ('rosbridge_service.RosBridgeService', 'readCommandValues'):
            face_utilities.unary_stream_inline(servicer.readCommandValues),
            ('rosbridge_service.RosBridgeService', 'readEncoderValues'):
            face_utilities.unary_stream_inline(servicer.readEncoderValues),
            ('rosbridge_service.RosBridgeService', 'streamTwistValues'):
            face_utilities.stream_unary_inline(servicer.streamTwistValues),
            ('rosbridge_service.RosBridgeService', 'writeTwistValue'):
            face_utilities.unary_unary_inline(servicer.writeTwistValue),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #20
0
    def beta_create_TaskManager_server(servicer,
                                       pool=None,
                                       pool_size=None,
                                       default_timeout=None,
                                       maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('gogrpcspec.TaskManager', 'AddTask'): Task.FromString,
            ('gogrpcspec.TaskManager', 'AddTasks'): Task.FromString,
            ('gogrpcspec.TaskManager', 'ChangeToDone'): Task.FromString,
            ('gogrpcspec.TaskManager', 'GetSummary'): Employee.FromString,
            ('gogrpcspec.TaskManager', 'GetTasks'): Employee.FromString,
        }
        response_serializers = {
            ('gogrpcspec.TaskManager', 'AddTask'):
            SpecificSummary.SerializeToString,
            ('gogrpcspec.TaskManager', 'AddTasks'): Summary.SerializeToString,
            ('gogrpcspec.TaskManager', 'ChangeToDone'): Task.SerializeToString,
            ('gogrpcspec.TaskManager', 'GetSummary'):
            SpecificSummary.SerializeToString,
            ('gogrpcspec.TaskManager', 'GetTasks'): Task.SerializeToString,
        }
        method_implementations = {
            ('gogrpcspec.TaskManager', 'AddTask'):
            face_utilities.unary_unary_inline(servicer.AddTask),
            ('gogrpcspec.TaskManager', 'AddTasks'):
            face_utilities.stream_unary_inline(servicer.AddTasks),
            ('gogrpcspec.TaskManager', 'ChangeToDone'):
            face_utilities.stream_stream_inline(servicer.ChangeToDone),
            ('gogrpcspec.TaskManager', 'GetSummary'):
            face_utilities.unary_unary_inline(servicer.GetSummary),
            ('gogrpcspec.TaskManager', 'GetTasks'):
            face_utilities.unary_stream_inline(servicer.GetTasks),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #21
0
    def beta_create_Bridge_server(servicer,
                                  pool=None,
                                  pool_size=None,
                                  default_timeout=None,
                                  maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('Bridge', 'GetX'): NullMessage.FromString,
            ('Bridge', 'Init'): NullMessage.FromString,
            ('Bridge', 'Run'): Item.FromString,
            ('Bridge', 'SetX'): X.FromString,
            ('Bridge', 'StoreMetric'): Item.FromString,
        }
        response_serializers = {
            ('Bridge', 'GetX'): X.SerializeToString,
            ('Bridge', 'Init'): NullMessage.SerializeToString,
            ('Bridge', 'Run'): Item.SerializeToString,
            ('Bridge', 'SetX'): NullMessage.SerializeToString,
            ('Bridge', 'StoreMetric'): NullMessage.SerializeToString,
        }
        method_implementations = {
            ('Bridge', 'GetX'):
            face_utilities.unary_unary_inline(servicer.GetX),
            ('Bridge', 'Init'):
            face_utilities.unary_unary_inline(servicer.Init),
            ('Bridge', 'Run'):
            face_utilities.stream_stream_inline(servicer.Run),
            ('Bridge', 'SetX'):
            face_utilities.unary_unary_inline(servicer.SetX),
            ('Bridge', 'StoreMetric'):
            face_utilities.stream_unary_inline(servicer.StoreMetric),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
    def beta_create_Calculator_server(servicer,
                                      pool=None,
                                      pool_size=None,
                                      default_timeout=None,
                                      maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('Calculator', 'Chat'):
            Number.FromString,
            ('Calculator', 'ReceiveEvents'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            ('Calculator', 'SendEvents'):
            Number.FromString,
            ('Calculator', 'SquareRoot'):
            Number.FromString,
        }
        response_serializers = {
            ('Calculator', 'Chat'): Number.SerializeToString,
            ('Calculator', 'ReceiveEvents'): Number.SerializeToString,
            ('Calculator', 'SendEvents'): Number.SerializeToString,
            ('Calculator', 'SquareRoot'): Number.SerializeToString,
        }
        method_implementations = {
            ('Calculator', 'Chat'):
            face_utilities.stream_stream_inline(servicer.Chat),
            ('Calculator', 'ReceiveEvents'):
            face_utilities.unary_stream_inline(servicer.ReceiveEvents),
            ('Calculator', 'SendEvents'):
            face_utilities.stream_unary_inline(servicer.SendEvents),
            ('Calculator', 'SquareRoot'):
            face_utilities.unary_unary_inline(servicer.SquareRoot),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #23
0
    def setUp(self):
        self._servicer = _Servicer()
        method_implementations = {
            (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
            (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
            (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
            (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
        }

        cardinalities = {
            _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
            _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
            _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
            _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
        }

        server_options = implementations.server_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._server = implementations.server(method_implementations,
                                              options=server_options)
        server_credentials = implementations.ssl_server_credentials([
            (
                resources.private_key(),
                resources.certificate_chain(),
            ),
        ])
        port = self._server.add_secure_port('[::]:0', server_credentials)
        self._server.start()
        self._channel_credentials = implementations.ssl_channel_credentials(
            resources.test_root_certificates())
        self._call_credentials = implementations.metadata_call_credentials(
            _metadata_plugin)
        channel = test_utilities.not_really_secure_channel(
            'localhost', port, self._channel_credentials,
            _SERVER_HOST_OVERRIDE)
        stub_options = implementations.stub_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._dynamic_stub = implementations.dynamic_stub(channel,
                                                          _GROUP,
                                                          cardinalities,
                                                          options=stub_options)
Example #24
0
def beta_create_FileService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  request_deserializers = {
    ('luci.swarming.bot.FileService', 'Contains'): ContainsRequest.FromString,
    ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsRequest.FromString,
    ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsRequest.FromString,
  }
  response_serializers = {
    ('luci.swarming.bot.FileService', 'Contains'): ContainsReply.SerializeToString,
    ('luci.swarming.bot.FileService', 'FetchBlobs'): FetchBlobsReply.SerializeToString,
    ('luci.swarming.bot.FileService', 'PushBlobs'): PushBlobsReply.SerializeToString,
  }
  method_implementations = {
    ('luci.swarming.bot.FileService', 'Contains'): face_utilities.unary_unary_inline(servicer.Contains),
    ('luci.swarming.bot.FileService', 'FetchBlobs'): face_utilities.unary_stream_inline(servicer.FetchBlobs),
    ('luci.swarming.bot.FileService', 'PushBlobs'): face_utilities.stream_unary_inline(servicer.PushBlobs),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
def beta_create_DroneConnect_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  """The Beta API is deprecated for 0.15.0 and later.

  It is recommended to use the GA API (classes and functions in this
  file not marked beta) for all further purposes. This function was
  generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
  request_deserializers = {
    ('droneconnect.DroneConnect', 'getAutopilotInfo'): UavIdentifier.FromString,
    ('droneconnect.DroneConnect', 'getPosition'): Null.FromString,
    ('droneconnect.DroneConnect', 'getSafety'): Null.FromString,
    ('droneconnect.DroneConnect', 'hasMode'): Null.FromString,
    ('droneconnect.DroneConnect', 'isArmed'): Null.FromString,
    ('droneconnect.DroneConnect', 'setArmed'): Armed.FromString,
    ('droneconnect.DroneConnect', 'setMode'): Mode.FromString,
    ('droneconnect.DroneConnect', 'setPath'): Position.FromString,
    ('droneconnect.DroneConnect', 'setSafety'): Safety.FromString,
    ('droneconnect.DroneConnect', 'takeoff'): TakeoffToAltitude.FromString,
  }
  response_serializers = {
    ('droneconnect.DroneConnect', 'getAutopilotInfo'): AutopilotInfo.SerializeToString,
    ('droneconnect.DroneConnect', 'getPosition'): Position.SerializeToString,
    ('droneconnect.DroneConnect', 'getSafety'): Safety.SerializeToString,
    ('droneconnect.DroneConnect', 'hasMode'): Mode.SerializeToString,
    ('droneconnect.DroneConnect', 'isArmed'): Armed.SerializeToString,
    ('droneconnect.DroneConnect', 'setArmed'): Null.SerializeToString,
    ('droneconnect.DroneConnect', 'setMode'): Null.SerializeToString,
    ('droneconnect.DroneConnect', 'setPath'): Null.SerializeToString,
    ('droneconnect.DroneConnect', 'setSafety'): Null.SerializeToString,
    ('droneconnect.DroneConnect', 'takeoff'): Position.SerializeToString,
  }
  method_implementations = {
    ('droneconnect.DroneConnect', 'getAutopilotInfo'): face_utilities.unary_unary_inline(servicer.getAutopilotInfo),
    ('droneconnect.DroneConnect', 'getPosition'): face_utilities.unary_unary_inline(servicer.getPosition),
    ('droneconnect.DroneConnect', 'getSafety'): face_utilities.unary_unary_inline(servicer.getSafety),
    ('droneconnect.DroneConnect', 'hasMode'): face_utilities.unary_unary_inline(servicer.hasMode),
    ('droneconnect.DroneConnect', 'isArmed'): face_utilities.unary_unary_inline(servicer.isArmed),
    ('droneconnect.DroneConnect', 'setArmed'): face_utilities.unary_unary_inline(servicer.setArmed),
    ('droneconnect.DroneConnect', 'setMode'): face_utilities.unary_unary_inline(servicer.setMode),
    ('droneconnect.DroneConnect', 'setPath'): face_utilities.stream_unary_inline(servicer.setPath),
    ('droneconnect.DroneConnect', 'setSafety'): face_utilities.unary_unary_inline(servicer.setSafety),
    ('droneconnect.DroneConnect', 'takeoff'): face_utilities.unary_unary_inline(servicer.takeoff),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
Example #26
0
    def beta_create_RouteGuide_server(servicer,
                                      pool=None,
                                      pool_size=None,
                                      default_timeout=None,
                                      maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('routeguide.RouteGuide', 'GetFeature'): Point.FromString,
            ('routeguide.RouteGuide', 'ListFeatures'): Rectangle.FromString,
            ('routeguide.RouteGuide', 'RecordRoute'): Point.FromString,
            ('routeguide.RouteGuide', 'RouteChat'): RouteNote.FromString,
        }
        response_serializers = {
            ('routeguide.RouteGuide', 'GetFeature'): Feature.SerializeToString,
            ('routeguide.RouteGuide', 'ListFeatures'):
            Feature.SerializeToString,
            ('routeguide.RouteGuide', 'RecordRoute'):
            RouteSummary.SerializeToString,
            ('routeguide.RouteGuide', 'RouteChat'):
            RouteNote.SerializeToString,
        }
        method_implementations = {
            ('routeguide.RouteGuide', 'GetFeature'):
            face_utilities.unary_unary_inline(servicer.GetFeature),
            ('routeguide.RouteGuide', 'ListFeatures'):
            face_utilities.unary_stream_inline(servicer.ListFeatures),
            ('routeguide.RouteGuide', 'RecordRoute'):
            face_utilities.stream_unary_inline(servicer.RecordRoute),
            ('routeguide.RouteGuide', 'RouteChat'):
            face_utilities.stream_stream_inline(servicer.RouteChat),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #27
0
def beta_create_mnist_Inference_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  request_deserializers = {
    ('mnist_DNN.mnist_Inference', 'GetInput'): mnist_DNN_pb2.ImageArray.FromString,
    ('mnist_DNN.mnist_Inference', 'GetMultiInput'): mnist_DNN_pb2.ImageArray.FromString,
  }
  response_serializers = {
    ('mnist_DNN.mnist_Inference', 'GetInput'): mnist_DNN_pb2.Digit.SerializeToString,
    ('mnist_DNN.mnist_Inference', 'GetMultiInput'): mnist_DNN_pb2.Digit.SerializeToString,
  }
  method_implementations = {
    ('mnist_DNN.mnist_Inference', 'GetInput'): face_utilities.unary_unary_inline(servicer.GetInput),
    ('mnist_DNN.mnist_Inference', 'GetMultiInput'): face_utilities.stream_unary_inline(servicer.GetMultiInput),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
Example #28
0
    def beta_create_ByteStream_server(servicer,
                                      pool=None,
                                      pool_size=None,
                                      default_timeout=None,
                                      maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('google.bytestream.ByteStream', 'QueryWriteStatus'):
            QueryWriteStatusRequest.FromString,
            ('google.bytestream.ByteStream', 'Read'):
            ReadRequest.FromString,
            ('google.bytestream.ByteStream', 'Write'):
            WriteRequest.FromString,
        }
        response_serializers = {
            ('google.bytestream.ByteStream', 'QueryWriteStatus'):
            QueryWriteStatusResponse.SerializeToString,
            ('google.bytestream.ByteStream', 'Read'):
            ReadResponse.SerializeToString,
            ('google.bytestream.ByteStream', 'Write'):
            WriteResponse.SerializeToString,
        }
        method_implementations = {
            ('google.bytestream.ByteStream', 'QueryWriteStatus'):
            face_utilities.unary_unary_inline(servicer.QueryWriteStatus),
            ('google.bytestream.ByteStream', 'Read'):
            face_utilities.unary_stream_inline(servicer.Read),
            ('google.bytestream.ByteStream', 'Write'):
            face_utilities.stream_unary_inline(servicer.Write),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #29
0
    def beta_create_FileService_server(servicer,
                                       pool=None,
                                       pool_size=None,
                                       default_timeout=None,
                                       maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('luci.swarming.bot.FileService', 'Contains'):
            ContainsRequest.FromString,
            ('luci.swarming.bot.FileService', 'FetchBlobs'):
            FetchBlobsRequest.FromString,
            ('luci.swarming.bot.FileService', 'PushBlobs'):
            PushBlobsRequest.FromString,
        }
        response_serializers = {
            ('luci.swarming.bot.FileService', 'Contains'):
            ContainsReply.SerializeToString,
            ('luci.swarming.bot.FileService', 'FetchBlobs'):
            FetchBlobsReply.SerializeToString,
            ('luci.swarming.bot.FileService', 'PushBlobs'):
            PushBlobsReply.SerializeToString,
        }
        method_implementations = {
            ('luci.swarming.bot.FileService', 'Contains'):
            face_utilities.unary_unary_inline(servicer.Contains),
            ('luci.swarming.bot.FileService', 'FetchBlobs'):
            face_utilities.unary_stream_inline(servicer.FetchBlobs),
            ('luci.swarming.bot.FileService', 'PushBlobs'):
            face_utilities.stream_unary_inline(servicer.PushBlobs),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #30
0
    def setUp(self):
        self._servicer = _Servicer()
        method_implementations = {
            (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
            (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
            (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
            (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
        }

        cardinalities = {
            _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
            _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
            _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
            _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
        }

        server_options = implementations.server_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._server = implementations.server(
            method_implementations, options=server_options)
        server_credentials = implementations.ssl_server_credentials([
            (
                resources.private_key(),
                resources.certificate_chain(),
            ),
        ])
        port = self._server.add_secure_port('[::]:0', server_credentials)
        self._server.start()
        self._channel_credentials = implementations.ssl_channel_credentials(
            resources.test_root_certificates())
        self._call_credentials = implementations.metadata_call_credentials(
            _metadata_plugin)
        channel = test_utilities.not_really_secure_channel(
            'localhost', port, self._channel_credentials, _SERVER_HOST_OVERRIDE)
        stub_options = implementations.stub_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._dynamic_stub = implementations.dynamic_stub(
            channel, _GROUP, cardinalities, options=stub_options)
def beta_create_MovieService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  import movie_service_pb2
  import movie_service_pb2
  import google.protobuf.empty_pb2
  import movie_service_pb2
  import google.protobuf.empty_pb2
  import movie_service_pb2
  import movie_service_pb2
  import movie_service_pb2
  import movie_service_pb2
  import movie_service_pb2
  import movie_service_pb2
  import movie_service_pb2
  request_deserializers = {
    ('movieservice.MovieService', 'GetMovieDetails'): movie_service_pb2.MovieRequest.FromString,
    ('movieservice.MovieService', 'ListAllMovies'): google.protobuf.empty_pb2.Empty.FromString,
    ('movieservice.MovieService', 'ListAllMoviesServerStreaming'): google.protobuf.empty_pb2.Empty.FromString,
    ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'): movie_service_pb2.MovieRequest.FromString,
    ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'): movie_service_pb2.MovieRequest.FromString,
    ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'): movie_service_pb2.MoviesInTheaterRequest.FromString,
  }
  response_serializers = {
    ('movieservice.MovieService', 'GetMovieDetails'): movie_service_pb2.Movie.SerializeToString,
    ('movieservice.MovieService', 'ListAllMovies'): movie_service_pb2.MoviesInTheaterResponse.SerializeToString,
    ('movieservice.MovieService', 'ListAllMoviesServerStreaming'): movie_service_pb2.Movie.SerializeToString,
    ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'): movie_service_pb2.Movie.SerializeToString,
    ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'): movie_service_pb2.MoviesInTheaterResponse.SerializeToString,
    ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'): movie_service_pb2.Movie.SerializeToString,
  }
  method_implementations = {
    ('movieservice.MovieService', 'GetMovieDetails'): face_utilities.unary_unary_inline(servicer.GetMovieDetails),
    ('movieservice.MovieService', 'ListAllMovies'): face_utilities.unary_unary_inline(servicer.ListAllMovies),
    ('movieservice.MovieService', 'ListAllMoviesServerStreaming'): face_utilities.unary_stream_inline(servicer.ListAllMoviesServerStreaming),
    ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'): face_utilities.stream_stream_inline(servicer.ListMoviesBidirectionalStreaming),
    ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'): face_utilities.stream_unary_inline(servicer.ListMoviesClientToServerStreaming),
    ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'): face_utilities.unary_stream_inline(servicer.ListMoviesServerToClientStreaming),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
def beta_create_Greeter_server(servicer,
                               pool=None,
                               pool_size=None,
                               default_timeout=None,
                               maximum_timeout=None):
    request_deserializers = {
        ('Greeter', 'SayHello'): HelloRequest.FromString,
        ('Greeter', 'SayHelloGoodbye'): HelloRequest.FromString,
        ('Greeter', 'SayHelloToMany'): HelloRequest.FromString,
        ('Greeter', 'SayHelloToManyAtOnce'): HelloRequest.FromString,
    }
    response_serializers = {
        ('Greeter', 'SayHello'): HelloReply.SerializeToString,
        ('Greeter', 'SayHelloGoodbye'): HelloReply.SerializeToString,
        ('Greeter', 'SayHelloToMany'): HelloReply.SerializeToString,
        ('Greeter', 'SayHelloToManyAtOnce'): HelloReply.SerializeToString,
    }
    method_implementations = {
        ('Greeter', 'SayHello'):
        face_utilities.unary_unary_inline(servicer.SayHello),
        ('Greeter', 'SayHelloGoodbye'):
        face_utilities.unary_stream_inline(servicer.SayHelloGoodbye),
        ('Greeter', 'SayHelloToMany'):
        face_utilities.stream_stream_inline(servicer.SayHelloToMany),
        ('Greeter', 'SayHelloToManyAtOnce'):
        face_utilities.stream_unary_inline(servicer.SayHelloToManyAtOnce),
    }
    server_options = beta_implementations.server_options(
        request_deserializers=request_deserializers,
        response_serializers=response_serializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
        default_timeout=default_timeout,
        maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations,
                                       options=server_options)
Example #33
0
    def beta_create_Monitor_server(servicer,
                                   pool=None,
                                   pool_size=None,
                                   default_timeout=None,
                                   maximum_timeout=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_deserializers = {
            ('monitor.Monitor', 'BrokerDownlink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
            .DownlinkMessage.FromString,
            ('monitor.Monitor', 'BrokerStatus'):
            github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
            .Status.FromString,
            ('monitor.Monitor', 'BrokerUplink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
            .DeduplicatedUplinkMessage.FromString,
            ('monitor.Monitor', 'GatewayDownlink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_router_dot_router__pb2
            .DownlinkMessage.FromString,
            ('monitor.Monitor', 'GatewayStatus'):
            github__com_dot_TheThingsNetwork_dot_api_dot_gateway_dot_gateway__pb2
            .Status.FromString,
            ('monitor.Monitor', 'GatewayUplink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_router_dot_router__pb2
            .UplinkMessage.FromString,
            ('monitor.Monitor', 'HandlerDownlink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
            .DownlinkMessage.FromString,
            ('monitor.Monitor', 'HandlerStatus'):
            github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2
            .Status.FromString,
            ('monitor.Monitor', 'HandlerUplink'):
            github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
            .DeduplicatedUplinkMessage.FromString,
            ('monitor.Monitor', 'NetworkServerStatus'):
            github__com_dot_TheThingsNetwork_dot_api_dot_networkserver_dot_networkserver__pb2
            .Status.FromString,
            ('monitor.Monitor', 'RouterStatus'):
            github__com_dot_TheThingsNetwork_dot_api_dot_router_dot_router__pb2
            .Status.FromString,
        }
        response_serializers = {
            ('monitor.Monitor', 'BrokerDownlink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'BrokerStatus'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'BrokerUplink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'GatewayDownlink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'GatewayStatus'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'GatewayUplink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'HandlerDownlink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'HandlerStatus'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'HandlerUplink'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'NetworkServerStatus'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('monitor.Monitor', 'RouterStatus'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        }
        method_implementations = {
            ('monitor.Monitor', 'BrokerDownlink'):
            face_utilities.stream_unary_inline(servicer.BrokerDownlink),
            ('monitor.Monitor', 'BrokerStatus'):
            face_utilities.stream_unary_inline(servicer.BrokerStatus),
            ('monitor.Monitor', 'BrokerUplink'):
            face_utilities.stream_unary_inline(servicer.BrokerUplink),
            ('monitor.Monitor', 'GatewayDownlink'):
            face_utilities.stream_unary_inline(servicer.GatewayDownlink),
            ('monitor.Monitor', 'GatewayStatus'):
            face_utilities.stream_unary_inline(servicer.GatewayStatus),
            ('monitor.Monitor', 'GatewayUplink'):
            face_utilities.stream_unary_inline(servicer.GatewayUplink),
            ('monitor.Monitor', 'HandlerDownlink'):
            face_utilities.stream_unary_inline(servicer.HandlerDownlink),
            ('monitor.Monitor', 'HandlerStatus'):
            face_utilities.stream_unary_inline(servicer.HandlerStatus),
            ('monitor.Monitor', 'HandlerUplink'):
            face_utilities.stream_unary_inline(servicer.HandlerUplink),
            ('monitor.Monitor', 'NetworkServerStatus'):
            face_utilities.stream_unary_inline(servicer.NetworkServerStatus),
            ('monitor.Monitor', 'RouterStatus'):
            face_utilities.stream_unary_inline(servicer.RouterStatus),
        }
        server_options = beta_implementations.server_options(
            request_deserializers=request_deserializers,
            response_serializers=response_serializers,
            thread_pool=pool,
            thread_pool_size=pool_size,
            default_timeout=default_timeout,
            maximum_timeout=maximum_timeout)
        return beta_implementations.server(method_implementations,
                                           options=server_options)
Example #34
0
def beta_create_ZfsRpc_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  request_deserializers = {
    ('zfs.ZfsRpc', 'CreateFile'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'Fetch'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'FetchDir'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'GetFileStat'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'MakeDir'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'RemoveDir'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'RemoveFile'): zfs_pb2.FilePath.FromString,
    ('zfs.ZfsRpc', 'Rename'): zfs_pb2.RenameMsg.FromString,
    ('zfs.ZfsRpc', 'SetFileStat'): zfs_pb2.FileStat.FromString,
    ('zfs.ZfsRpc', 'Store'): zfs_pb2.FileDataBlock.FromString,
    ('zfs.ZfsRpc', 'TestAuth'): zfs_pb2.TestAuthRequest.FromString,
  }
  response_serializers = {
    ('zfs.ZfsRpc', 'CreateFile'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'Fetch'): zfs_pb2.FileDataBlock.SerializeToString,
    ('zfs.ZfsRpc', 'FetchDir'): zfs_pb2.DirListBlock.SerializeToString,
    ('zfs.ZfsRpc', 'GetFileStat'): zfs_pb2.FileStat.SerializeToString,
    ('zfs.ZfsRpc', 'MakeDir'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'RemoveDir'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'RemoveFile'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'Rename'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'SetFileStat'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'Store'): zfs_pb2.StdReply.SerializeToString,
    ('zfs.ZfsRpc', 'TestAuth'): zfs_pb2.TestAuthReply.SerializeToString,
  }
  method_implementations = {
    ('zfs.ZfsRpc', 'CreateFile'): face_utilities.unary_unary_inline(servicer.CreateFile),
    ('zfs.ZfsRpc', 'Fetch'): face_utilities.unary_stream_inline(servicer.Fetch),
    ('zfs.ZfsRpc', 'FetchDir'): face_utilities.unary_stream_inline(servicer.FetchDir),
    ('zfs.ZfsRpc', 'GetFileStat'): face_utilities.unary_unary_inline(servicer.GetFileStat),
    ('zfs.ZfsRpc', 'MakeDir'): face_utilities.unary_unary_inline(servicer.MakeDir),
    ('zfs.ZfsRpc', 'RemoveDir'): face_utilities.unary_unary_inline(servicer.RemoveDir),
    ('zfs.ZfsRpc', 'RemoveFile'): face_utilities.unary_unary_inline(servicer.RemoveFile),
    ('zfs.ZfsRpc', 'Rename'): face_utilities.unary_unary_inline(servicer.Rename),
    ('zfs.ZfsRpc', 'SetFileStat'): face_utilities.unary_unary_inline(servicer.SetFileStat),
    ('zfs.ZfsRpc', 'Store'): face_utilities.stream_unary_inline(servicer.Store),
    ('zfs.ZfsRpc', 'TestAuth'): face_utilities.unary_unary_inline(servicer.TestAuth),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)
def beta_create_MovieService_server(servicer,
                                    pool=None,
                                    pool_size=None,
                                    default_timeout=None,
                                    maximum_timeout=None):
    import movie_service_pb2
    import movie_service_pb2
    import google.protobuf.empty_pb2
    import movie_service_pb2
    import google.protobuf.empty_pb2
    import movie_service_pb2
    import movie_service_pb2
    import movie_service_pb2
    import movie_service_pb2
    import movie_service_pb2
    import movie_service_pb2
    import movie_service_pb2
    request_deserializers = {
        ('movieservice.MovieService', 'GetMovieDetails'):
        movie_service_pb2.MovieRequest.FromString,
        ('movieservice.MovieService', 'ListAllMovies'):
        google.protobuf.empty_pb2.Empty.FromString,
        ('movieservice.MovieService', 'ListAllMoviesServerStreaming'):
        google.protobuf.empty_pb2.Empty.FromString,
        ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'):
        movie_service_pb2.MovieRequest.FromString,
        ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'):
        movie_service_pb2.MovieRequest.FromString,
        ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'):
        movie_service_pb2.MoviesInTheaterRequest.FromString,
    }
    response_serializers = {
        ('movieservice.MovieService', 'GetMovieDetails'):
        movie_service_pb2.Movie.SerializeToString,
        ('movieservice.MovieService', 'ListAllMovies'):
        movie_service_pb2.MoviesInTheaterResponse.SerializeToString,
        ('movieservice.MovieService', 'ListAllMoviesServerStreaming'):
        movie_service_pb2.Movie.SerializeToString,
        ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'):
        movie_service_pb2.Movie.SerializeToString,
        ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'):
        movie_service_pb2.MoviesInTheaterResponse.SerializeToString,
        ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'):
        movie_service_pb2.Movie.SerializeToString,
    }
    method_implementations = {
        ('movieservice.MovieService', 'GetMovieDetails'):
        face_utilities.unary_unary_inline(servicer.GetMovieDetails),
        ('movieservice.MovieService', 'ListAllMovies'):
        face_utilities.unary_unary_inline(servicer.ListAllMovies),
        ('movieservice.MovieService', 'ListAllMoviesServerStreaming'):
        face_utilities.unary_stream_inline(
            servicer.ListAllMoviesServerStreaming),
        ('movieservice.MovieService', 'ListMoviesBidirectionalStreaming'):
        face_utilities.stream_stream_inline(
            servicer.ListMoviesBidirectionalStreaming),
        ('movieservice.MovieService', 'ListMoviesClientToServerStreaming'):
        face_utilities.stream_unary_inline(
            servicer.ListMoviesClientToServerStreaming),
        ('movieservice.MovieService', 'ListMoviesServerToClientStreaming'):
        face_utilities.unary_stream_inline(
            servicer.ListMoviesServerToClientStreaming),
    }
    server_options = beta_implementations.server_options(
        request_deserializers=request_deserializers,
        response_serializers=response_serializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
        default_timeout=default_timeout,
        maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations,
                                       options=server_options)