2021-12-13 18:08:32 +00:00
|
|
|
# tractor: structured concurrent "actors".
|
|
|
|
# Copyright 2018-eternity Tyler Goodlet.
|
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2018-06-07 04:26:49 +00:00
|
|
|
"""
|
2021-12-13 18:08:32 +00:00
|
|
|
tractor: structured concurrent "actors".
|
|
|
|
|
2018-06-07 04:26:49 +00:00
|
|
|
"""
|
2018-11-19 19:15:28 +00:00
|
|
|
from trio import MultiError
|
2018-06-07 04:26:49 +00:00
|
|
|
|
2021-10-16 15:31:26 +00:00
|
|
|
from ._clustering import open_actor_cluster
|
2020-12-27 15:55:00 +00:00
|
|
|
from ._ipc import Channel
|
2021-05-12 03:41:26 +00:00
|
|
|
from ._streaming import (
|
|
|
|
Context,
|
|
|
|
ReceiveMsgStream,
|
|
|
|
MsgStream,
|
|
|
|
stream,
|
|
|
|
context,
|
|
|
|
)
|
2022-03-07 21:21:52 +00:00
|
|
|
from ._discovery import (
|
|
|
|
get_arbiter,
|
|
|
|
find_actor,
|
|
|
|
wait_for_actor,
|
|
|
|
query_actor,
|
|
|
|
)
|
2021-10-04 16:39:52 +00:00
|
|
|
from ._supervise import open_nursery
|
2022-09-15 20:15:17 +00:00
|
|
|
from ._state import (
|
|
|
|
current_actor,
|
|
|
|
is_root_process,
|
|
|
|
)
|
2021-06-13 22:02:27 +00:00
|
|
|
from ._exceptions import (
|
|
|
|
RemoteActorError,
|
|
|
|
ModuleNotExposed,
|
|
|
|
ContextCancelled,
|
|
|
|
)
|
2020-07-23 17:32:29 +00:00
|
|
|
from ._debug import breakpoint, post_mortem
|
2020-10-16 02:47:11 +00:00
|
|
|
from . import msg
|
2022-09-15 20:15:17 +00:00
|
|
|
from ._root import (
|
|
|
|
run_daemon,
|
|
|
|
open_root_actor,
|
|
|
|
)
|
2021-05-25 13:17:53 +00:00
|
|
|
from ._portal import Portal
|
2022-08-29 19:13:16 +00:00
|
|
|
from ._runtime import Actor
|
2018-07-14 20:09:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
2022-08-29 19:13:16 +00:00
|
|
|
'Actor',
|
2020-12-27 15:55:00 +00:00
|
|
|
'Channel',
|
|
|
|
'Context',
|
2022-03-07 21:21:52 +00:00
|
|
|
'ContextCancelled',
|
2020-12-27 15:55:00 +00:00
|
|
|
'ModuleNotExposed',
|
2022-03-07 21:21:52 +00:00
|
|
|
'MsgStream',
|
2020-12-27 15:55:00 +00:00
|
|
|
'MultiError',
|
2022-03-07 21:21:52 +00:00
|
|
|
'Portal',
|
|
|
|
'ReceiveMsgStream',
|
2020-12-27 15:55:00 +00:00
|
|
|
'RemoteActorError',
|
2020-10-13 15:03:55 +00:00
|
|
|
'breakpoint',
|
2022-03-07 21:21:52 +00:00
|
|
|
'context',
|
2018-08-13 03:59:19 +00:00
|
|
|
'current_actor',
|
|
|
|
'find_actor',
|
|
|
|
'get_arbiter',
|
2020-12-27 15:55:00 +00:00
|
|
|
'is_root_process',
|
|
|
|
'msg',
|
2021-10-16 15:31:26 +00:00
|
|
|
'open_actor_cluster',
|
2018-08-13 03:59:19 +00:00
|
|
|
'open_nursery',
|
2020-12-27 15:55:00 +00:00
|
|
|
'open_root_actor',
|
|
|
|
'post_mortem',
|
2022-03-07 21:21:52 +00:00
|
|
|
'query_actor',
|
2020-12-27 15:55:00 +00:00
|
|
|
'run_daemon',
|
2019-03-26 01:36:13 +00:00
|
|
|
'stream',
|
2020-12-27 15:55:00 +00:00
|
|
|
'to_asyncio',
|
|
|
|
'wait_for_actor',
|
2018-07-14 20:09:05 +00:00
|
|
|
]
|