feature(grpc): Add engine version to version svc

Fixes #1269

Add two new fields in the version service for falco's engine version and
the checksum of all of the fields it understands.

This will require rebuilding/re-releasing all the clients.

Signed-off-by: Spencer Krum <nibz@spencerkrum.com>
This commit is contained in:
Spencer Krum 2020-12-11 22:03:49 +00:00 committed by poiana
parent 574e7f433b
commit d03a1f4a9b
2 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,7 @@ limitations under the License.
*/
#include "config_falco.h"
#include "falco_engine_version.h"
#include "grpc_server_impl.h"
#include "grpc_queue.h"
#include "logger.h"
@ -75,6 +76,9 @@ void falco::grpc::server_impl::version(const context& ctx, const version::reques
auto& version = *res.mutable_version();
version = FALCO_VERSION;
res.set_engine_version(FALCO_ENGINE_VERSION);
res.set_engine_fields_checksum(FALCO_FIELDS_CHECKSUM);
res.set_major(FALCO_VERSION_MAJOR);
res.set_minor(FALCO_VERSION_MINOR);
res.set_patch(FALCO_VERSION_PATCH);

View File

@ -36,10 +36,14 @@ message request
// its parts as per semver 2.0 specification (https://semver.org).
message response
{
// falco version
string version = 1;
uint32 major = 2;
uint32 minor = 3;
uint32 patch = 4;
string prerelease = 5;
string build = 6;
}
// falco engine version
uint32 engine_version = 7;
string engine_fields_checksum = 8;
}