mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-15 07:22:05 +00:00
new(userspace/falco): gRPC context for bidirectional services
Co-authored-by: Lorenzo Fontana <lo@linux.com> Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
a72f27c028
commit
be6c4b273d
@ -63,5 +63,24 @@ public:
|
|||||||
mutable bool m_has_more = false;
|
mutable bool m_has_more = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class bidi_context : public context
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bidi_context(::grpc::ServerContext* ctx):
|
||||||
|
context(ctx){};
|
||||||
|
~bidi_context() = default;
|
||||||
|
|
||||||
|
enum : char
|
||||||
|
{
|
||||||
|
WAIT_CONNECT = 1,
|
||||||
|
READY_TO_WRITE,
|
||||||
|
WAIT_WRITE_DONE,
|
||||||
|
FINISHED,
|
||||||
|
} m_status = WAIT_CONNECT;
|
||||||
|
|
||||||
|
mutable void* m_stream = nullptr; // todo(fntlnz, leodido) > useful in the future
|
||||||
|
mutable bool m_has_more = false; // fixme > needed?
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace grpc
|
} // namespace grpc
|
||||||
} // namespace falco
|
} // namespace falco
|
||||||
|
Loading…
Reference in New Issue
Block a user