mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-28 03:05:04 -06:00
59bee17b2b
Previously, the server loop functions were returned explicitly as outputs (having three outputs for the loop functions and one for the error). If we want to add more this approach doesn't work very well. So this introduced a slice as the output of the Listen function for the Server struct, which allows us to loop over it and iterate over however many loop functions we need. This keeps the same logic as before, and is merely a first step in refactoring this logic. Signed-off-by: Juan Antonio Osorio Robles <jaosorior@redhat.com>