updated appenders service

This commit is contained in:
2025-05-04 00:21:38 +03:00
parent 01f3e82a54
commit 0cde34a9bc
12 changed files with 492 additions and 62 deletions

View File

@@ -30,3 +30,23 @@ def service_list_route(
FoundCluster = ServiceEndpointRouterCluster.get_event_cluster("ServiceList")
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
return event_cluster_matched.event_callable(data=data)
@service_endpoint_route.post(
path="/to/events",
description="List events of a service endpoint given service UUID",
operation_id="7b6b0c6a-e3db-4353-a7df-ea49d2a67f8a",
)
def service_to_events_route(
data: PaginateOnly,
headers: CommonHeaders = Depends(CommonHeaders.as_dependency),
):
"""
List events of a service given service UUID
"""
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
FoundCluster = ServiceEndpointRouterCluster.get_event_cluster("ServiceToEvents")
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
return event_cluster_matched.event_callable(data=data)