Common: Add register_common_agent_event_serializers()

This commit is contained in:
Mike Salvatore 2022-09-13 15:02:07 -04:00
parent ad01003480
commit 5905d3bf5b
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,4 @@
from .i_event_serializer import IEventSerializer, JSONSerializable
from .event_serializer_registry import EventSerializerRegistry
from .pydantic_event_serializer import PydanticEventSerializer
from .register import register_common_agent_event_serializers

View File

@ -0,0 +1,9 @@
from common.events import CredentialsStolenEvent
from . import EventSerializerRegistry, PydanticEventSerializer
def register_common_agent_event_serializers(event_serializer_registry: EventSerializerRegistry):
event_serializer_registry[CredentialsStolenEvent] = PydanticEventSerializer(
CredentialsStolenEvent
)