openpectus.engine.engine_message_handlers
Attributes
Classes
Base class for protocol classes. |
|
Module Contents
- openpectus.engine.engine_message_handlers.logger
- class openpectus.engine.engine_message_handlers.EngineDispatcherRpcHandler
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto(Protocol[T]): def meth(self) -> T: ...
- abstract set_rpc_handler(message_type, handler)
- Parameters:
message_type (type[openpectus.protocol.aggregator_messages.AggregatorMessage])
handler (openpectus.protocol.engine_dispatcher.EngineMessageHandler)
- class openpectus.engine.engine_message_handlers.EngineMessageHandlers(engine, dispatcher)
- Parameters:
engine (openpectus.engine.engine.Engine)
dispatcher (EngineDispatcherRpcHandler)
- engine
- __str__()
- Return type:
str
- async handle_methodMsg(msg)
- Parameters:
msg (openpectus.protocol.aggregator_messages.AggregatorMessage)
- async handle_executeControlCommandMsg(msg)
- Parameters:
msg (openpectus.protocol.aggregator_messages.AggregatorMessage)
- Return type:
- async handle_injectCodeMsg(msg)
- Parameters:
msg (openpectus.protocol.aggregator_messages.AggregatorMessage)
- Return type:
- async handle_cancelMsg(msg)
- Parameters:
msg (openpectus.protocol.aggregator_messages.AggregatorMessage)
- Return type:
- async handle_forceMsg(msg)
- Parameters:
msg (openpectus.protocol.aggregator_messages.AggregatorMessage)
- Return type: