|
6 | 6 | This package contains |
7 | 7 | [channel](https://en.wikipedia.org/wiki/Channel_(programming)) implementations. |
8 | 8 |
|
9 | | -Channels: |
10 | | -
|
11 | | -* [Anycast][frequenz.channels.Anycast]: A channel that supports multiple |
12 | | - senders and multiple receivers. A message sent through a sender will be |
13 | | - received by exactly one receiver. |
14 | | -
|
15 | | -* [Bidirectional][frequenz.channels.Bidirectional]: A channel providing |
16 | | - a `client` and a `service` handle to send and receive bidirectionally. |
17 | | -
|
18 | | -* [Broadcast][frequenz.channels.Broadcast]: A channel to broadcast messages |
19 | | - from multiple senders to multiple receivers. Each message sent through any of |
20 | | - the senders is received by all of the receivers. |
21 | | -
|
22 | | -Other base classes: |
23 | | -
|
24 | | -* [Peekable][frequenz.channels.Peekable]: An object to allow users to get |
25 | | - a peek at the latest value in the channel, without consuming anything. |
26 | | -
|
27 | | -* [Receiver][frequenz.channels.Receiver]: An object that can wait for and |
28 | | - consume messages from a channel. |
| 9 | +Main base classes and functions: |
29 | 10 |
|
30 | 11 | * [Sender][frequenz.channels.Sender]: An object that can send messages to |
31 | 12 | a channel. |
32 | 13 |
|
33 | | -Utilities: |
34 | | -
|
35 | | -* [util][frequenz.channels.util]: A module with utilities, like special |
36 | | - receivers that implement timers, file watchers, merge receivers, or wait for |
37 | | - messages in multiple channels. |
38 | | -
|
39 | | -Exception classes: |
40 | | -
|
41 | | -* [Error][frequenz.channels.Error]: Base class for all errors in this |
42 | | - library. |
43 | | -
|
44 | | -* [ChannelError][frequenz.channels.ChannelError]: Base class for all errors |
45 | | - related to channels. |
| 14 | +* [Receiver][frequenz.channels.Receiver]: An object that can wait for and |
| 15 | + consume messages from a channel. |
46 | 16 |
|
47 | | -* [ChannelClosedError][frequenz.channels.ChannelClosedError]: Error raised when |
48 | | - trying to operate (send, receive, etc.) through a closed channel. |
| 17 | +* [selected()][frequenz.channels.select]: A function to wait on multiple |
| 18 | + receivers at once. |
49 | 19 |
|
50 | | -* [SenderError][frequenz.channels.SenderError]: Base class for all errors |
51 | | - related to senders. |
| 20 | +Channels: |
52 | 21 |
|
53 | | -* [ReceiverError][frequenz.channels.ReceiverError]: Base class for all errors |
54 | | - related to receivers. |
| 22 | +* [Anycast][frequenz.channels.anycast.Anycast]: A channel that supports multiple |
| 23 | + senders and multiple receivers. A message sent through a sender will be |
| 24 | + received by exactly one receiver. |
55 | 25 |
|
56 | | -* [ReceiverStoppedError][frequenz.channels.ReceiverStoppedError]: A receiver |
57 | | - stopped producing messages. |
| 26 | +* [Bidirectional][frequenz.channels.bidirectional.Bidirectional]: A channel providing |
| 27 | + a `client` and a `service` handle to send and receive bidirectionally. |
58 | 28 |
|
59 | | -* [ReceiverInvalidatedError][frequenz.channels.ReceiverInvalidatedError]: |
60 | | - A receiver is not longer valid (for example if it was converted into |
61 | | - a peekable. |
| 29 | +* [Broadcast][frequenz.channels.broadcast.Broadcast]: A channel to broadcast messages |
| 30 | + from multiple senders to multiple receivers. Each message sent through any of |
| 31 | + the senders is received by all of the receivers. |
62 | 32 | """ |
63 | 33 |
|
64 | | -from . import util |
65 | | -from ._anycast import Anycast |
66 | | -from ._base_classes import Peekable, Receiver, Sender |
67 | | -from ._bidirectional import Bidirectional |
68 | | -from ._broadcast import Broadcast |
69 | | -from ._exceptions import ( |
70 | | - ChannelClosedError, |
71 | | - ChannelError, |
72 | | - Error, |
| 34 | +from ._exceptions import ChannelClosedError, ChannelError, Error |
| 35 | +from ._receiver import ( |
| 36 | + Peekable, |
| 37 | + Receiver, |
73 | 38 | ReceiverError, |
74 | 39 | ReceiverInvalidatedError, |
75 | 40 | ReceiverStoppedError, |
76 | | - SenderError, |
77 | 41 | ) |
| 42 | +from ._select import ( |
| 43 | + Selected, |
| 44 | + SelectError, |
| 45 | + SelectErrorGroup, |
| 46 | + UnhandledSelectedError, |
| 47 | + select, |
| 48 | + selected_from, |
| 49 | +) |
| 50 | +from ._sender import Sender, SenderError |
78 | 51 |
|
79 | 52 | __all__ = [ |
80 | | - "Anycast", |
81 | | - "Bidirectional", |
82 | | - "Broadcast", |
83 | 53 | "ChannelClosedError", |
84 | 54 | "ChannelError", |
85 | 55 | "Error", |
|
88 | 58 | "ReceiverError", |
89 | 59 | "ReceiverInvalidatedError", |
90 | 60 | "ReceiverStoppedError", |
| 61 | + "SelectError", |
| 62 | + "SelectErrorGroup", |
| 63 | + "Selected", |
91 | 64 | "Sender", |
92 | 65 | "SenderError", |
93 | | - "util", |
| 66 | + "UnhandledSelectedError", |
| 67 | + "select", |
| 68 | + "selected_from", |
94 | 69 | ] |
0 commit comments