Skip to content

Commit c9ce04c

Browse files
committed
Make types and actor accessible
The actor will need to be started somehow. Until integration into the SDK, the user has to do it themselves.
1 parent 851159a commit c9ce04c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/frequenz/dispatch/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
from frequenz.dispatch.actor import DispatchActor, DispatchEvent
1111

12-
__all__ = ["Dispatcher"]
12+
DispatchReceiver = Receiver[Dispatch]
13+
"""Type alias for a dispatch receiver."""
14+
15+
DispatchEventReceiver = Receiver[DispatchEvent]
16+
"""Type alias for a dispatch event receiver."""
1317

1418

1519
class Dispatcher:
@@ -57,6 +61,15 @@ def __init__(
5761
self._ready_channel.new_sender(),
5862
)
5963

64+
@property
65+
def actor(self) -> DispatchActor:
66+
"""Return the actor.
67+
68+
Returns:
69+
The actor.
70+
"""
71+
return self._actor
72+
6073
async def start(self) -> None:
6174
"""Start the actor."""
6275
self._actor.start()

0 commit comments

Comments
 (0)