Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Split out edu/query registration to a separate class #2976

Merged
merged 3 commits into from
Mar 13, 2018

Conversation

erikjohnston
Copy link
Member

This is a step towards properly splitting up the replication layer into client and server parts. The change is necessary to break the dependency cycle between the federation server and handlers.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm other than quibbling about pydoc


Args:
edu_type (str): The type of the incoming EDU to register handler for
handler (Callable[str, dict]): A callable invoked on incoming EDU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Callable[str, dict] means "a thing that takes a str and returns a dict". You probably want Callable[[str, dict], Deferred[None]] or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I misread the thingy. Ta.

Args:
query_type (str): Category name of the query, which should match
the string used by make_query.
handler (Callable[dict] -> Deferred[dict]): Invoked to handle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Callable[dict, Deferred[dict]]

@richvdh richvdh assigned erikjohnston and unassigned richvdh Mar 13, 2018
@erikjohnston erikjohnston force-pushed the erikj/replication_registry branch from 93862f5 to f43b6d6 Compare March 13, 2018 11:29
@erikjohnston erikjohnston merged commit 141c343 into develop Mar 13, 2018
@erikjohnston erikjohnston deleted the erikj/replication_registry branch March 22, 2018 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants