Skip to content
Snippets Groups Projects
Commit 8e1e60e3 authored by Nathan Hertz's avatar Nathan Hertz
Browse files

Added some documentation

parent 8cb9263b
No related branches found
No related tags found
No related merge requests found
"""
File that contains a collection of helper functions that provide easy access to common AMQP functions, such as
opening and closing connections and channels, sending events, and listening for events
"""
import json
from abc import ABC, abstractmethod
from typing import Callable, Any, Optional, Union, TypeVar, Protocol, Generic
......@@ -16,6 +20,9 @@ CONN = None
class ChannelDefinition(Protocol[T]):
"""
Abstract implementation of an AMQP channel
"""
@abstractmethod
def routing_key_for(self, message: T) -> str:
pass
......@@ -35,6 +42,9 @@ class ChannelDefinition(Protocol[T]):
class WorkflowEventChannel(ChannelDefinition[WorkflowEvent]):
"""
Class that represents an AMQP channel connected to the Workflow Service exchange
"""
EXCHANGE = "workspaces.workflow-service.workflow-status"
def schema(self) -> Schema:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment