]> git.puffer.fish Git - matthieu/frr.git/commit
lib: grpc: rework RPC handlers improve code clarity
authorChristian Hopps <chopps@labn.net>
Mon, 21 Feb 2022 01:30:52 +0000 (20:30 -0500)
committerChristian Hopps <chopps@labn.net>
Mon, 14 Mar 2022 19:54:25 +0000 (15:54 -0400)
commit48c93061f581dfea6beda4c9934db2bdb22bc774
tree9dd60bb30dd2622ba4847fb0ec80c81077949dad
parent341e1d6e0a1f6524197142e679929bcd52385978
lib: grpc: rework RPC handlers improve code clarity

- split NewRpcState object into 2, a Unary and a Streaming variant, which
  then allows for the next.
- move all state machine details inside these new state objects
  - use a template arg to allow for Streaming state tracking object
    creation and deletion w/o requiring this in each specific RPC
    hander.
- Code is more rugged by design now.

Thanks to Rafael Zalamena <rzalamena@opensourcerouting.org> for the cleanup
ideas/motivation.

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/northbound_grpc.cpp