I think you can do this with a server interceptor. Simply delay
calling next until
the configuration is available.

On Tue, Aug 1, 2017 at 2:22 AM, Carfield Yim <carfi...@gmail.com> wrote:

> Hi all
>
> I've a server process develop using grpc, I would like to have a cool DR
> which receive request but don't stream response until that config option
> set to true
>
> The implementation option I know is that in the service class, I handle
> that option and then don't run the StreamObserver.onNext(msg) until that
> config option set to true. However, if I doing that, I need to have that
> block of code for all my service classes.
>
> If there any better implementation approach?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/grpc-io/b6be3cdb-8618-415b-8939-7ce2c90b4560%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/b6be3cdb-8618-415b-8939-7ce2c90b4560%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oPCw_umZtTPs3psUA5s6%2BkEE63Jv9Hq9ruo%3D9508xqn%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to