diff --git a/.gitignore b/.gitignore index 0b458e3e8c..c8909ff74a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ tmp/ private/ nexus/server/tests/assets/*.json nexus/server/tests/results/actual/ + +go.work +go.work.sum diff --git a/flow/cmd/version.go b/flow/cmd/version.go new file mode 100644 index 0000000000..58074fa75c --- /dev/null +++ b/flow/cmd/version.go @@ -0,0 +1,16 @@ +package main + +import ( + "context" + + "github.com/PeerDB-io/peer-flow/connectors/utils" + "github.com/PeerDB-io/peer-flow/generated/protos" +) + +func (h *FlowRequestHandler) GetVersion( + ctx context.Context, + req *protos.PeerDBVersionRequest, +) (*protos.PeerDBVersionResponse, error) { + version := utils.GetEnvString("PEERDB_VERSION_SHA_SHORT", "unknown") + return &protos.PeerDBVersionResponse{Version: version}, nil +}