From 4ffe7f828be269496bca53060e1684862d13ed12 Mon Sep 17 00:00:00 2001 From: Rohil Surana Date: Thu, 31 Mar 2022 18:00:38 +0530 Subject: [PATCH] feat(entropy): add GetLog endpoint to stream resource logs --- odpf/entropy/v1beta1/service.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/odpf/entropy/v1beta1/service.proto b/odpf/entropy/v1beta1/service.proto index 00129982..dbb7285d 100644 --- a/odpf/entropy/v1beta1/service.proto +++ b/odpf/entropy/v1beta1/service.proto @@ -51,6 +51,12 @@ service ResourceService { body: "params" }; } + + rpc GetLog(GetLogRequest) returns (stream GetLogResponse) { + option (google.api.http) = { + get: "/v1beta1/resources/{urn}/logs" + }; + } } message Resource { @@ -123,3 +129,17 @@ message ApplyActionRequest { message ApplyActionResponse { Resource resource = 1; } + +message LogChunk { + bytes data = 1; + map labels = 2; +} + +message GetLogRequest { + string urn = 1; + map filter = 6; +} + +message GetLogResponse { + LogChunk chunk = 1; +}