3030
3131# pylint: enable=no-name-in-module
3232from frequenz .channels import Receiver
33- from frequenz .client .base .grpc_streaming_helper import GrpcStreamingHelper
34- from frequenz .client .base .retry_strategy import LinearBackoff , RetryStrategy
33+ from frequenz .client .base import retry , streaming
3534from google .protobuf .empty_pb2 import Empty # pylint: disable=no-name-in-module
3635
3736from ._component import (
@@ -68,7 +67,7 @@ def __init__(
6867 self ,
6968 grpc_channel : grpc .aio .Channel ,
7069 target : str ,
71- retry_spec : RetryStrategy = LinearBackoff (),
70+ retry_spec : retry . Strategy = retry . LinearBackoff (),
7271 ) -> None :
7372 """Initialize the class instance.
7473
@@ -85,7 +84,7 @@ def __init__(
8584 self .api = MicrogridStub (grpc_channel )
8685 """The gRPC stub for the microgrid API."""
8786
88- self ._broadcasters : dict [int , GrpcStreamingHelper [Any , Any ]] = {}
87+ self ._broadcasters : dict [int , streaming . GrpcStreamBroadcaster [Any , Any ]] = {}
8988 self ._retry_spec = retry_spec
9089
9190 async def components (self ) -> Iterable [Component ]:
@@ -264,7 +263,7 @@ async def _new_component_data_receiver(
264263
265264 broadcaster = self ._broadcasters .setdefault (
266265 component_id ,
267- GrpcStreamingHelper (
266+ streaming . GrpcStreamBroadcaster (
268267 f"raw-component-data-{ component_id } " ,
269268 # We need to cast here because grpc says StreamComponentData is
270269 # a grpc.CallIterator[PbComponentData], not a
0 commit comments