On Jul 25, 2025, at 7:20 PM, Léa Galet <leaesper...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/d7d3b535-e670-48e8-af1e-366dfb1d0b56n%40googlegroups.com.
The standard and correct way to handle this is to embrace the client-server nature of gRPC. The plugin (exec2) should perform its logic and then return the modified data back to the main application (exec1).
The workflow should be:
exec1 (Client): Calls a gRPC function on exec2, passing the current state of the item in the request.
exec2 (Server): Receives the item (as a copy), performs its updates on that copy.
exec2 (Server): Returns the fully updated item in the gRPC response.
exec1 (Client): Receives the response and updates its original item with the returned data.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/600BA26A-8FEA-42E6-80D8-96A082B0BB9C%40ix.netcom.com.
The Correct Approach: Return the Updated Value
The plugin (
exec2) should perform its logic and then return the modified data back to the main application (exec1).
The workflow should be:
exec1(Client): Calls a gRPC function onexec2, passing the current state of the item in the request.
exec2(Server): Receives the item (as a copy), performs its updates on that copy.
exec2(Server): Returns the fully updated item in the gRPC response.
exec1(Client): Receives the response and updates its original item with the returned data.
On Jul 26, 2025, at 2:00 PM, Jon Perryman <jon.pe...@gmail.com> wrote: