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

Middileware func before request #13

Open
s3rj1k opened this issue Nov 29, 2017 · 2 comments
Open

Middileware func before request #13

s3rj1k opened this issue Nov 29, 2017 · 2 comments
Labels

Comments

@s3rj1k
Copy link
Contributor

s3rj1k commented Nov 29, 2017

Please provide example Middileware func that runs before request is precessed but after rpc acquires method and params for request.

Needed for uuid generation for specific request.

@sergeyfast
Copy link
Contributor

Thank you for your feedback. We are going to implement Funcware. It's like a middleware, but runs in another part of flow: Middleware -> Funcware -> Func -> Funcware -> Middleware.
Funcware:

    // call before => method, namespace, args
    resp.Set(s.Method(args.S))
    // call after  => result, err

So, you'll be able to access (and modify) result and error and access to args as struct before. Is it ok for you?

@s3rj1k
Copy link
Contributor Author

s3rj1k commented Nov 29, 2017

@sergeyfast
Thanks for quick response, yes this should be sufficient.

Any timeframe on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants