@@ -321,16 +321,16 @@ def __init__(self, conf: dict):
321
321
raise ValueError ("Unrecognized properties: {}"
322
322
.format (", " .join (conf_copy .keys ())))
323
323
324
- def get (self , url : str , query : Optional [dict ] = None ) -> Any :
324
+ async def get (self , url : str , query : Optional [dict ] = None ) -> Any :
325
325
raise NotImplementedError ()
326
326
327
- def post (self , url : str , body : Optional [dict ], ** kwargs ) -> Any :
327
+ async def post (self , url : str , body : Optional [dict ], ** kwargs ) -> Any :
328
328
raise NotImplementedError ()
329
329
330
- def delete (self , url : str ) -> Any :
330
+ async def delete (self , url : str ) -> Any :
331
331
raise NotImplementedError ()
332
332
333
- def put (self , url : str , body : Optional [dict ] = None ) -> Any :
333
+ async def put (self , url : str , body : Optional [dict ] = None ) -> Any :
334
334
raise NotImplementedError ()
335
335
336
336
@@ -560,9 +560,9 @@ class AsyncSchemaRegistryClient(object):
560
560
`Confluent Schema Registry documentation <http://confluent.io/docs/current/schema-registry/docs/intro.html>`_
561
561
""" # noqa: E501
562
562
563
- def __init__ (self , conf : dict ):
563
+ def __init__ (self , conf : dict , rest_client : _AsyncRestClient = None ):
564
564
self ._conf = conf
565
- self ._rest_client = _AsyncRestClient (conf )
565
+ self ._rest_client = rest_client or _AsyncRestClient (conf )
566
566
self ._cache = _SchemaCache ()
567
567
cache_capacity = self ._rest_client .cache_capacity
568
568
cache_ttl = self ._rest_client .cache_latest_ttl_sec
0 commit comments