resource-engine 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. resource_engine/__init__.py +96 -0
  2. resource_engine/application/__init__.py +1 -0
  3. resource_engine/application/actions.py +48 -0
  4. resource_engine/application/context.py +111 -0
  5. resource_engine/application/events.py +54 -0
  6. resource_engine/application/hooks.py +272 -0
  7. resource_engine/application/idempotency.py +277 -0
  8. resource_engine/application/manager.py +1987 -0
  9. resource_engine/application/query.py +47 -0
  10. resource_engine/application/registry.py +137 -0
  11. resource_engine/application/relations.py +470 -0
  12. resource_engine/application/resource.py +984 -0
  13. resource_engine/application/searching.py +162 -0
  14. resource_engine/application/settings.py +169 -0
  15. resource_engine/application/slots.py +67 -0
  16. resource_engine/application/state_machines.py +177 -0
  17. resource_engine/application/timers.py +347 -0
  18. resource_engine/application/transaction.py +100 -0
  19. resource_engine/application/views.py +239 -0
  20. resource_engine/audit/__init__.py +40 -0
  21. resource_engine/audit/export.py +280 -0
  22. resource_engine/audit/history.py +165 -0
  23. resource_engine/audit/janitor.py +257 -0
  24. resource_engine/audit/model.py +98 -0
  25. resource_engine/audit/recorder.py +145 -0
  26. resource_engine/audit/resource.py +68 -0
  27. resource_engine/audit/seal.py +327 -0
  28. resource_engine/audit/sink.py +69 -0
  29. resource_engine/authz/__init__.py +72 -0
  30. resource_engine/authz/apikeys.py +300 -0
  31. resource_engine/authz/base.py +143 -0
  32. resource_engine/authz/catalog.py +291 -0
  33. resource_engine/authz/conditions.py +416 -0
  34. resource_engine/authz/config.py +77 -0
  35. resource_engine/authz/evaluator.py +382 -0
  36. resource_engine/authz/external.py +249 -0
  37. resource_engine/authz/fields.py +44 -0
  38. resource_engine/authz/model.py +145 -0
  39. resource_engine/authz/resources.py +289 -0
  40. resource_engine/authz/roles.py +101 -0
  41. resource_engine/cache.py +144 -0
  42. resource_engine/calls.py +100 -0
  43. resource_engine/capabilities.py +145 -0
  44. resource_engine/composite.py +295 -0
  45. resource_engine/documents/__init__.py +69 -0
  46. resource_engine/documents/content.py +57 -0
  47. resource_engine/documents/events.py +49 -0
  48. resource_engine/documents/janitor.py +93 -0
  49. resource_engine/documents/machine.py +38 -0
  50. resource_engine/documents/manager.py +704 -0
  51. resource_engine/documents/model.py +91 -0
  52. resource_engine/documents/pipeline.py +98 -0
  53. resource_engine/documents/processors.py +320 -0
  54. resource_engine/documents/resource.py +39 -0
  55. resource_engine/domain/__init__.py +10 -0
  56. resource_engine/domain/events.py +50 -0
  57. resource_engine/domain/exceptions.py +23 -0
  58. resource_engine/email.py +417 -0
  59. resource_engine/errors.py +562 -0
  60. resource_engine/explorer.py +133 -0
  61. resource_engine/exports.py +687 -0
  62. resource_engine/generation.py +233 -0
  63. resource_engine/i18n.py +251 -0
  64. resource_engine/identity.py +46 -0
  65. resource_engine/integration.py +80 -0
  66. resource_engine/jobs.py +390 -0
  67. resource_engine/locale/ca/LC_MESSAGES/resource_engine.mo +0 -0
  68. resource_engine/locale/ca/LC_MESSAGES/resource_engine.po +206 -0
  69. resource_engine/locale/es/LC_MESSAGES/resource_engine.mo +0 -0
  70. resource_engine/locale/es/LC_MESSAGES/resource_engine.po +206 -0
  71. resource_engine/logs.py +201 -0
  72. resource_engine/messaging/__init__.py +73 -0
  73. resource_engine/messaging/asyncapi.py +529 -0
  74. resource_engine/messaging/cloudevents.py +98 -0
  75. resource_engine/messaging/consumer.py +165 -0
  76. resource_engine/messaging/delivery.py +115 -0
  77. resource_engine/messaging/envelope.py +193 -0
  78. resource_engine/messaging/hub.py +148 -0
  79. resource_engine/messaging/inbound.py +76 -0
  80. resource_engine/messaging/inspection.py +113 -0
  81. resource_engine/messaging/janitor.py +136 -0
  82. resource_engine/messaging/live.py +179 -0
  83. resource_engine/messaging/processing.py +357 -0
  84. resource_engine/messaging/publishing.py +318 -0
  85. resource_engine/messaging/relay.py +84 -0
  86. resource_engine/messaging/worker.py +166 -0
  87. resource_engine/nosql.py +394 -0
  88. resource_engine/ports/__init__.py +13 -0
  89. resource_engine/ports/activity.py +171 -0
  90. resource_engine/ports/audit.py +42 -0
  91. resource_engine/ports/authz.py +132 -0
  92. resource_engine/ports/cache.py +41 -0
  93. resource_engine/ports/email.py +118 -0
  94. resource_engine/ports/event_publisher.py +34 -0
  95. resource_engine/ports/idempotency.py +69 -0
  96. resource_engine/ports/identity.py +112 -0
  97. resource_engine/ports/locks.py +28 -0
  98. resource_engine/ports/messaging.py +197 -0
  99. resource_engine/ports/observability.py +60 -0
  100. resource_engine/ports/ratelimit.py +59 -0
  101. resource_engine/ports/repository.py +56 -0
  102. resource_engine/ports/storage.py +93 -0
  103. resource_engine/ports/templates.py +54 -0
  104. resource_engine/ports/tracing.py +61 -0
  105. resource_engine/ports/unit_of_work.py +46 -0
  106. resource_engine/processes.py +408 -0
  107. resource_engine/py.typed +0 -0
  108. resource_engine/querying.py +319 -0
  109. resource_engine/ratelimit.py +217 -0
  110. resource_engine/reporting.py +230 -0
  111. resource_engine/schema_examples.py +51 -0
  112. resource_engine/templates.py +143 -0
  113. resource_engine/tenancy.py +68 -0
  114. resource_engine/testing/__init__.py +34 -0
  115. resource_engine/testing/activity.py +123 -0
  116. resource_engine/testing/contracts.py +1416 -0
  117. resource_engine/testing/email.py +36 -0
  118. resource_engine/testing/engine.py +40 -0
  119. resource_engine/testing/memory.py +603 -0
  120. resource_engine/testing/storage.py +110 -0
  121. resource_engine/testing/tracing.py +100 -0
  122. resource_engine/tracing.py +156 -0
  123. resource_engine/translatable.py +80 -0
  124. resource_engine/versions.py +189 -0
  125. resource_engine-0.1.0.dist-info/METADATA +36 -0
  126. resource_engine-0.1.0.dist-info/RECORD +128 -0
  127. resource_engine-0.1.0.dist-info/WHEEL +4 -0
  128. resource_engine-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,206 @@
1
+ # Spanish translations of Resource Engine's own messages.
2
+ msgid ""
3
+ msgstr ""
4
+ "Content-Type: text/plain; charset=UTF-8\n"
5
+ "Language: es\n"
6
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
7
+
8
+ msgctxt "RE-E000"
9
+ msgid "Something went wrong."
10
+ msgstr "Algo ha fallado."
11
+
12
+ msgctxt "RE-E001"
13
+ msgid "The application is misconfigured."
14
+ msgstr "La aplicación no está bien configurada."
15
+
16
+ msgctxt "RE-E002"
17
+ msgid "This kind of record does not exist."
18
+ msgstr "Este tipo de registro no existe."
19
+
20
+ msgctxt "RE-E003"
21
+ msgid "This operation is not available."
22
+ msgstr "Esta operación no está disponible."
23
+
24
+ msgctxt "RE-E004"
25
+ msgid "The application is misconfigured."
26
+ msgstr "La aplicación no está bien configurada."
27
+
28
+ msgctxt "RE-E005"
29
+ msgid "The application is misconfigured."
30
+ msgstr "La aplicación no está bien configurada."
31
+
32
+ msgctxt "RE-E007"
33
+ msgid "The changes could not be saved together."
34
+ msgstr "Los cambios no se han podido guardar juntos."
35
+
36
+ msgctxt "RE-E008"
37
+ msgid "The application is misconfigured."
38
+ msgstr "La aplicación no está bien configurada."
39
+
40
+ msgctxt "RE-E009"
41
+ msgid "The history is not available."
42
+ msgstr "El historial no está disponible."
43
+
44
+ msgctxt "RE-E010"
45
+ msgid "A message template is missing."
46
+ msgstr "Falta una plantilla de mensaje."
47
+
48
+ msgctxt "RE-E011"
49
+ msgid "A message template could not be filled in."
50
+ msgstr "No se ha podido rellenar una plantilla de mensaje."
51
+
52
+ msgctxt "RE-E012"
53
+ msgid "There are too many changes to save together."
54
+ msgstr "Hay demasiados cambios para guardarlos juntos."
55
+
56
+ msgctxt "RE-E101"
57
+ msgid "Some fields are not valid."
58
+ msgstr "Algunos campos no son válidos."
59
+
60
+ msgctxt "RE-E102"
61
+ msgid "The record does not exist."
62
+ msgstr "El registro no existe."
63
+
64
+ msgctxt "RE-E103"
65
+ msgid "The search cannot be done this way."
66
+ msgstr "La búsqueda no se puede hacer de esta manera."
67
+
68
+ msgctxt "RE-E104"
69
+ msgid "The application is misconfigured."
70
+ msgstr "La aplicación no está bien configurada."
71
+
72
+ msgctxt "RE-E105"
73
+ msgid "Someone else changed this record. Reload it and try again."
74
+ msgstr "Otra persona ha modificado este registro. Vuelve a cargarlo e inténtalo de nuevo."
75
+
76
+ msgctxt "RE-E106"
77
+ msgid "Reload the record before changing it."
78
+ msgstr "Vuelve a cargar el registro antes de modificarlo."
79
+
80
+ msgctxt "RE-E107"
81
+ msgid "This request was already made with other data."
82
+ msgstr "Esta petición ya se había hecho con otros datos."
83
+
84
+ msgctxt "RE-E108"
85
+ msgid "A related record does not exist."
86
+ msgstr "Un registro relacionado no existe."
87
+
88
+ msgctxt "RE-E109"
89
+ msgid "Other records still depend on this one."
90
+ msgstr "Otros registros todavía dependen de este."
91
+
92
+ msgctxt "RE-E201"
93
+ msgid "This step is not possible now."
94
+ msgstr "Este paso no es posible ahora."
95
+
96
+ msgctxt "RE-E202"
97
+ msgid "This step does not exist."
98
+ msgstr "Este paso no existe."
99
+
100
+ msgctxt "RE-E301"
101
+ msgid "This action does not exist."
102
+ msgstr "Esta acción no existe."
103
+
104
+ msgctxt "RE-E401"
105
+ msgid "Some messages could not be sent."
106
+ msgstr "Algunos mensajes no se han podido enviar."
107
+
108
+ msgctxt "RE-E402"
109
+ msgid "A message could not be handled."
110
+ msgstr "Un mensaje no se ha podido tratar."
111
+
112
+ msgctxt "RE-E403"
113
+ msgid "The application is misconfigured."
114
+ msgstr "La aplicación no está bien configurada."
115
+
116
+ msgctxt "RE-E404"
117
+ msgid "The application is misconfigured."
118
+ msgstr "La aplicación no está bien configurada."
119
+
120
+ msgctxt "RE-E405"
121
+ msgid "A message could not be read."
122
+ msgstr "Un mensaje no se ha podido leer."
123
+
124
+ msgctxt "RE-E406"
125
+ msgid "A message was refused."
126
+ msgstr "Un mensaje se ha rechazado."
127
+
128
+ msgctxt "RE-E501"
129
+ msgid "Another service did not answer. Try again later."
130
+ msgstr "Otro servicio no ha respondido. Inténtalo de nuevo más tarde."
131
+
132
+ msgctxt "RE-E502"
133
+ msgid "The email could not be delivered."
134
+ msgstr "El correo no se ha podido entregar."
135
+
136
+ msgctxt "RE-E601"
137
+ msgid "This kind of document does not exist."
138
+ msgstr "Este tipo de documento no existe."
139
+
140
+ msgctxt "RE-E602"
141
+ msgid "This type of file is not accepted."
142
+ msgstr "Este tipo de archivo no se acepta."
143
+
144
+ msgctxt "RE-E603"
145
+ msgid "The file is too large."
146
+ msgstr "El archivo es demasiado grande."
147
+
148
+ msgctxt "RE-E604"
149
+ msgid "The upload did not complete."
150
+ msgstr "La subida no se ha completado."
151
+
152
+ msgctxt "RE-E605"
153
+ msgid "The document is not available yet."
154
+ msgstr "El documento todavía no está disponible."
155
+
156
+ msgctxt "RE-E606"
157
+ msgid "A required document is missing."
158
+ msgstr "Falta un documento necesario."
159
+
160
+ msgctxt "RE-E607"
161
+ msgid "Files cannot be stored right now. Try again later."
162
+ msgstr "Ahora no se pueden guardar archivos. Inténtalo de nuevo más tarde."
163
+
164
+ msgctxt "RE-E608"
165
+ msgid "The file does not exist."
166
+ msgstr "El archivo no existe."
167
+
168
+ msgctxt "RE-E701"
169
+ msgid "Sign in to continue."
170
+ msgstr "Inicia sesión para continuar."
171
+
172
+ msgctxt "RE-E702"
173
+ msgid "You are not allowed to do this."
174
+ msgstr "No tienes permiso para hacer esto."
175
+
176
+ msgctxt "RE-E703"
177
+ msgid "The policy is not valid."
178
+ msgstr "La política no es válida."
179
+
180
+ msgctxt "RE-E704"
181
+ msgid "You cannot grant more than you have."
182
+ msgstr "No puedes conceder más de lo que tienes."
183
+
184
+ msgctxt "RE-E705"
185
+ msgid "The policy uses a condition this system cannot apply."
186
+ msgstr "La política usa una condición que este sistema no puede aplicar."
187
+
188
+ msgctxt "RE-E706"
189
+ msgid "You are not allowed to change some of these fields."
190
+ msgstr "No tienes permiso para modificar algunos de estos campos."
191
+
192
+ msgctxt "RE-E707"
193
+ msgid "You cannot search or sort by this field."
194
+ msgstr "No puedes buscar ni ordenar por este campo."
195
+
196
+ msgctxt "RE-E708"
197
+ msgid "Choose an organisation first."
198
+ msgstr "Elige primero una organización."
199
+
200
+ msgctxt "RE-E709"
201
+ msgid "This belongs to another organisation."
202
+ msgstr "Esto pertenece a otra organización."
203
+
204
+ msgctxt "RE-E710"
205
+ msgid "Too many requests. Wait a moment and try again."
206
+ msgstr "Demasiadas peticiones. Espera un momento y vuelve a intentarlo."
@@ -0,0 +1,201 @@
1
+ """Structured logs: the operation, message or job a log line belongs to, and
2
+ JSON output. See docs/observability.md#logs.
3
+
4
+ ```python
5
+ from resource_engine.logs import configure_logging
6
+
7
+ configure_logging(format="json") # one JSON object per line on stderr
8
+ ```
9
+
10
+ The engine keeps a *log context* while it works: ``resource``, ``operation``,
11
+ ``correlation_id``, ``entity_id`` and ``action`` inside a manager operation;
12
+ ``consumer``, ``message_id``, ``event_type`` and the envelope's
13
+ ``correlation_id`` while a consumer handles a message; ``job`` during a
14
+ ``JobRunner`` run. ``LogContextFilter`` copies it onto every record, so your own
15
+ ``logging`` calls inside hooks and handlers carry it too. ``JsonFormatter`` adds
16
+ the trace and span ids of the current span when a tracer is configured.
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ import json
22
+ import logging
23
+ import sys
24
+ import traceback
25
+ from collections.abc import Iterator, Mapping
26
+ from contextlib import contextmanager
27
+ from contextvars import ContextVar
28
+ from datetime import UTC, datetime
29
+ from typing import Any, Literal, TextIO, override
30
+
31
+ #: Fields the engine puts in the log context, in output order.
32
+ CONTEXT_FIELDS = (
33
+ "request_id",
34
+ "correlation_id",
35
+ "resource",
36
+ "operation",
37
+ "entity_id",
38
+ "action",
39
+ "consumer",
40
+ "message_id",
41
+ "event_type",
42
+ "job",
43
+ )
44
+
45
+ _context: ContextVar[dict[str, Any] | None] = ContextVar(
46
+ "resource_engine_log_context", default=None
47
+ )
48
+
49
+ # Attributes every LogRecord has; anything else came from ``extra=``.
50
+ _STANDARD = set(logging.makeLogRecord({}).__dict__) | {"message", "asctime", "taskName"}
51
+
52
+
53
+ def log_context() -> dict[str, Any]:
54
+ """The current log context (a copy)."""
55
+ return dict(_context.get() or {})
56
+
57
+
58
+ @contextmanager
59
+ def bind_log_context(**fields: Any) -> Iterator[dict[str, Any]]:
60
+ """Add ``fields`` to the log context inside the block. Nested blocks see
61
+ the outer fields too; ``None`` values are left out. Yields the new context,
62
+ which the engine updates in place once it knows more (the correlation id)."""
63
+ current = {**(_context.get() or {}), **{k: v for k, v in fields.items() if v is not None}}
64
+ token = _context.set(current)
65
+ try:
66
+ yield current
67
+ finally:
68
+ _context.reset(token)
69
+
70
+
71
+ def update_log_context(**fields: Any) -> None:
72
+ """Set ``fields`` in the innermost ``bind_log_context`` block (no-op outside one)."""
73
+ current = _context.get()
74
+ if current is not None:
75
+ current.update({k: v for k, v in fields.items() if v is not None})
76
+
77
+
78
+ def _trace_ids() -> tuple[str | None, str | None]:
79
+ from resource_engine.tracing import get_tracer
80
+
81
+ parent = get_tracer().inject().get("traceparent", "")
82
+ parts = parent.split("-")
83
+ if len(parts) >= 3 and len(parts[1]) == 32 and len(parts[2]) == 16:
84
+ return parts[1], parts[2]
85
+ return None, None
86
+
87
+
88
+ class LogContextFilter(logging.Filter):
89
+ """Copy the log context onto each record (``record.correlation_id``…, ``None``
90
+ when unset) and the current span's ``trace_id`` and ``span_id``. Add it to
91
+ a handler so formatters, including plain text ones, can use the fields."""
92
+
93
+ @override
94
+ def filter(self, record: logging.LogRecord) -> bool:
95
+ if getattr(record, "_resource_engine", False):
96
+ return True
97
+ context = _context.get() or {}
98
+ for name in CONTEXT_FIELDS:
99
+ if not hasattr(record, name):
100
+ setattr(record, name, context.get(name))
101
+ if not hasattr(record, "trace_id"):
102
+ record.trace_id, record.span_id = _trace_ids()
103
+ record._resource_engine = True
104
+ return True
105
+
106
+
107
+ class JsonFormatter(logging.Formatter):
108
+ """One JSON object per record: ``timestamp`` (UTC, ISO 8601), ``level``,
109
+ ``logger``, ``message``, the log context fields that are set, ``trace_id``
110
+ and ``span_id``, ``exception`` (the formatted traceback) and every
111
+ ``extra=`` field.
112
+
113
+ Args:
114
+ static: Fields added to every line (``{"service": "billing"}``).
115
+ """
116
+
117
+ def __init__(self, *, static: Mapping[str, Any] | None = None) -> None:
118
+ super().__init__()
119
+ self.static = dict(static or {})
120
+ self._filter = LogContextFilter()
121
+
122
+ @override
123
+ def format(self, record: logging.LogRecord) -> str:
124
+ self._filter.filter(record) # when the handler has no LogContextFilter
125
+ line: dict[str, Any] = {
126
+ "timestamp": datetime.fromtimestamp(record.created, UTC).isoformat(
127
+ timespec="milliseconds"
128
+ ),
129
+ "level": record.levelname,
130
+ "logger": record.name,
131
+ "message": record.getMessage(),
132
+ **self.static,
133
+ }
134
+ for name in (*CONTEXT_FIELDS, "trace_id", "span_id"):
135
+ value = getattr(record, name, None)
136
+ if value is not None:
137
+ line[name] = value
138
+ for name, value in record.__dict__.items():
139
+ if name not in _STANDARD and name not in line and not name.startswith("_"):
140
+ if name in CONTEXT_FIELDS or name in ("trace_id", "span_id"):
141
+ continue
142
+ line[name] = value
143
+ if record.exc_info:
144
+ line["exception"] = "".join(traceback.format_exception(*record.exc_info)).rstrip()
145
+ line.setdefault("error_type", error_type(record.exc_info[1]))
146
+ elif record.exc_text:
147
+ line["exception"] = record.exc_text
148
+ if record.stack_info:
149
+ line["stack"] = record.stack_info
150
+ return json.dumps(line, default=str, ensure_ascii=False)
151
+
152
+
153
+ def error_type(error: BaseException | None) -> str | None:
154
+ """The engine's code for ``error`` (``RE-E702``, a ``DomainError`` code), or
155
+ its class name."""
156
+ if error is None:
157
+ return None
158
+ code = getattr(error, "code", None)
159
+ return code if isinstance(code, str) and code else type(error).__name__
160
+
161
+
162
+ TEXT_FORMAT = "%(asctime)s %(levelname)s %(name)s [%(correlation_id)s] %(message)s"
163
+
164
+
165
+ def configure_logging(
166
+ *,
167
+ format: Literal["json", "text"] = "text",
168
+ level: int | str = logging.INFO,
169
+ stream: TextIO | None = None,
170
+ static: Mapping[str, Any] | None = None,
171
+ ) -> logging.Handler:
172
+ """Replace the root logger's handlers with one stream handler (stderr by
173
+ default) carrying the log context. ``text`` shows the correlation id in
174
+ brackets; ``json`` writes one ``JsonFormatter`` object per line. Returns the
175
+ handler."""
176
+ handler = logging.StreamHandler(stream or sys.stderr)
177
+ handler.addFilter(LogContextFilter())
178
+ if format == "json":
179
+ handler.setFormatter(JsonFormatter(static=static))
180
+ elif format == "text":
181
+ handler.setFormatter(logging.Formatter(TEXT_FORMAT))
182
+ else:
183
+ raise ValueError(f"format must be 'json' or 'text', not {format!r}")
184
+ root = logging.getLogger()
185
+ for existing in list(root.handlers):
186
+ root.removeHandler(existing)
187
+ root.addHandler(handler)
188
+ root.setLevel(level.upper() if isinstance(level, str) else level)
189
+ return handler
190
+
191
+
192
+ __all__ = [
193
+ "CONTEXT_FIELDS",
194
+ "JsonFormatter",
195
+ "LogContextFilter",
196
+ "bind_log_context",
197
+ "configure_logging",
198
+ "error_type",
199
+ "log_context",
200
+ "update_log_context",
201
+ ]
@@ -0,0 +1,73 @@
1
+ """Event messaging: envelopes, delivery strategies, outbox relay, routing,
2
+ consumers and retention."""
3
+
4
+ from resource_engine.messaging.asyncapi import asyncapi_document
5
+ from resource_engine.messaging.cloudevents import CONTENT_TYPE as CLOUDEVENTS_CONTENT_TYPE
6
+ from resource_engine.messaging.cloudevents import from_cloudevent, to_cloudevent, to_cloudevent_json
7
+ from resource_engine.messaging.consumer import EventRouter
8
+ from resource_engine.messaging.delivery import (
9
+ AfterCommitDelivery,
10
+ EventDelivery,
11
+ OutboxDelivery,
12
+ TransportEventPublisher,
13
+ )
14
+ from resource_engine.messaging.envelope import EventEnvelope, EventSerializer, to_jsonable
15
+ from resource_engine.messaging.hub import EventHub, FanoutPublisher, Subscription
16
+ from resource_engine.messaging.inbound import (
17
+ decode_body,
18
+ decode_http,
19
+ envelope_from_json,
20
+ try_decode,
21
+ )
22
+ from resource_engine.messaging.inspection import MessagingInspector
23
+ from resource_engine.messaging.janitor import MessagingJanitor, MessagingJanitorStats
24
+ from resource_engine.messaging.live import LiveEvent, LiveEvents
25
+ from resource_engine.messaging.processing import (
26
+ ActivityMessageObserver,
27
+ LoggingObserver,
28
+ MessageProcessor,
29
+ Outcome,
30
+ ProcessResult,
31
+ RetryPolicy,
32
+ )
33
+ from resource_engine.messaging.publishing import EventPublishing
34
+ from resource_engine.messaging.relay import OutboxRelay
35
+ from resource_engine.messaging.worker import ConsumerStats, MessageConsumer
36
+
37
+ __all__ = [
38
+ "CLOUDEVENTS_CONTENT_TYPE",
39
+ "ActivityMessageObserver",
40
+ "AfterCommitDelivery",
41
+ "ConsumerStats",
42
+ "EventDelivery",
43
+ "EventEnvelope",
44
+ "EventHub",
45
+ "EventPublishing",
46
+ "EventRouter",
47
+ "EventSerializer",
48
+ "FanoutPublisher",
49
+ "LiveEvent",
50
+ "LiveEvents",
51
+ "LoggingObserver",
52
+ "MessageConsumer",
53
+ "MessageProcessor",
54
+ "MessagingInspector",
55
+ "MessagingJanitor",
56
+ "MessagingJanitorStats",
57
+ "OutboxDelivery",
58
+ "OutboxRelay",
59
+ "Outcome",
60
+ "ProcessResult",
61
+ "RetryPolicy",
62
+ "Subscription",
63
+ "TransportEventPublisher",
64
+ "asyncapi_document",
65
+ "decode_body",
66
+ "decode_http",
67
+ "envelope_from_json",
68
+ "from_cloudevent",
69
+ "to_cloudevent",
70
+ "to_cloudevent_json",
71
+ "to_jsonable",
72
+ "try_decode",
73
+ ]