From fc216d37de65fe298f18f1b00b644466c22ce129 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 4 Jan 2024 10:05:53 -0500 Subject: [PATCH] Drop `__all__` import style from `.services` --- piker/service/__init__.py | 72 ++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/piker/service/__init__.py b/piker/service/__init__.py index 95e39450..29360620 100644 --- a/piker/service/__init__.py +++ b/piker/service/__init__.py @@ -14,49 +14,45 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -""" -Actor-runtime service orchestration machinery. +''' +Actor runtime primtives and (distributed) service APIs for, -""" -from __future__ import annotations +- daemon-service mgmt: `_daemon` (i.e. low-level spawn and supervise machinery + for sub-actors like `brokerd`, `emsd`, datad`, etc.) -from ._mngr import Services -from ._registry import ( # noqa - _tractor_kwargs, - _default_reg_addr, - _default_registry_host, - _default_registry_port, - open_registry, - find_service, - check_for_service, +- service-actor supervision (via `trio` tasks) API: `._mngr` + +- discovery interface (via light wrapping around `tractor`'s built-in + prot): `._registry` + +- `docker` cntr SC supervision for use with `trio`: `_ahab` + - wrappers for marketstore and elasticsearch dbs + => TODO: maybe to (re)move elsewhere? + +''' +from ._mngr import Services as Services +from ._registry import ( + _tractor_kwargs as _tractor_kwargs, + _default_reg_addr as _default_reg_addr, + _default_registry_host as _default_registry_host, + _default_registry_port as _default_registry_port, + + open_registry as open_registry, + find_service as find_service, + check_for_service as check_for_service, ) -from ._daemon import ( # noqa - maybe_spawn_daemon, - spawn_emsd, - maybe_open_emsd, +from ._daemon import ( + maybe_spawn_daemon as maybe_spawn_daemon, + spawn_emsd as spawn_emsd, + maybe_open_emsd as maybe_open_emsd, ) from ._actor_runtime import ( - open_piker_runtime, - maybe_open_pikerd, - open_pikerd, - get_runtime_vars, + open_piker_runtime as open_piker_runtime, + maybe_open_pikerd as maybe_open_pikerd, + open_pikerd as open_pikerd, + get_runtime_vars as get_runtime_vars, ) from ..brokers._daemon import ( - spawn_brokerd, - maybe_spawn_brokerd, + spawn_brokerd as spawn_brokerd, + maybe_spawn_brokerd as maybe_spawn_brokerd, ) - - -__all__ = [ - 'check_for_service', - 'Services', - 'maybe_spawn_daemon', - 'spawn_brokerd', - 'maybe_spawn_brokerd', - 'spawn_emsd', - 'maybe_open_emsd', - 'open_piker_runtime', - 'maybe_open_pikerd', - 'open_pikerd', - 'get_runtime_vars', -]