Skip to content

Commit

Permalink
Added new GPRC service to stream policy updates
Browse files Browse the repository at this point in the history
Signed-off-by: Wazir Ahmed <wazir@accuknox.com>
  • Loading branch information
wazir-ahmed committed Sep 19, 2022
1 parent 797e6b4 commit cdb0806
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/protobuf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build:
protoc -I=. --go_out . --go_opt paths=source_relative --go-grpc_out . --go-grpc_opt paths=source_relative v1/analyzer/analyzer.proto
protoc -I=. --go_out . --go_opt paths=source_relative --go-grpc_out . --go-grpc_opt paths=source_relative v1/insight/insight.proto
protoc -I=. --go_out . --go_opt paths=source_relative --go-grpc_out . --go-grpc_opt paths=source_relative v1/observability/observability.proto

protoc -I=. --go_out . --go_opt paths=source_relative --go-grpc_out . --go-grpc_opt paths=source_relative v1/discovery/discovery.proto
1 change: 1 addition & 0 deletions src/protobuf/install_protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export PATH="$PATH:$HOME/.local/bin"

rm protoc-3.15.8-linux-x86_64.zip

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
312 changes: 312 additions & 0 deletions src/protobuf/v1/discovery/discovery.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions src/protobuf/v1/discovery/discovery.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
syntax = "proto3";

package v1.discovery;

option go_package = "github.com/accuknox/knoxAutoPolicy/protos/v1/discovery";

service Discovery {
rpc GetPolicy(GetPolicyRequest) returns (stream GetPolicyResponse) {}
}

message GetPolicyRequest {
bool follow = 1;
repeated string kind = 2;
string cluster = 3;
string namespace = 4;
repeated string label = 5;
}

message GetPolicyResponse {
string kind = 1;
string cluster = 2;
string namespace = 3;
repeated string label = 4;
string name = 5;
bytes yaml = 6;
string error = 100;
}
Loading

0 comments on commit cdb0806

Please sign in to comment.