Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify operator "message" option type / interface #9

Open
loreanvictor opened this issue Jun 18, 2020 · 0 comments
Open

Unify operator "message" option type / interface #9

loreanvictor opened this issue Jun 18, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@loreanvictor
Copy link
Owner

Many operators respond to incoming requests with preset status / messages. These status / messages are not fed to operators in a unified manner, some operators do not accept one (timeout()), some operators accept them directly as parameters (reject()) and others get them as part of an options object (check()).

Further more, the current situation does not allow for custom messages per request, which limits applicability. I would propose moving to a unified API, and all operators also accepting functions (sync or async) that would generate the message based on packet. I suspect passing them as part of an options object in a unified manner would result in a more readable outcome.

@loreanvictor loreanvictor added the enhancement New feature or request label Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant