Skip to content

Commit

Permalink
feat: enable vtprotobuf, watch batching, more limits
Browse files Browse the repository at this point in the history
Fixes #5

Batch watch responses in a single batch so that client can quickly know
that initial snapshot got delivered.

Bump go.mod deps.

Implement more limits.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Sep 23, 2021
1 parent 7174ec1 commit 6195466
Show file tree
Hide file tree
Showing 21 changed files with 504 additions and 206 deletions.
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2021-09-22T21:32:59Z by kres 2a27963-dirty.
# Generated on 2021-09-23T14:58:27Z by kres 2a27963-dirty.

codecov:
require_ci_to_pass: false
Expand All @@ -9,7 +9,7 @@ coverage:
status:
project:
default:
target: 15%
target: 30%
threshold: 0.5%
base: auto
if_ci_failed: success
Expand Down
2 changes: 1 addition & 1 deletion .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
---
kind: service.CodeCov
spec:
targetThreshold: 15
targetThreshold: 30
5 changes: 4 additions & 1 deletion api/v1alpha1/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ service Cluster {
// List affiliates in the cluster.
rpc List(ListRequest) returns (ListResponse);
// Watch affiliate updates in the cluster.
//
// The first WatchResponse contains the snapshot of the current affiliate state (even if empty).
// Subsequent response messages are sent as the affiliates get changed.
rpc Watch(WatchRequest) returns (stream WatchResponse);
}

Expand Down Expand Up @@ -108,7 +111,7 @@ message WatchRequest {

message WatchResponse {
// List of cluster affiliates.
Affiliate affiliate = 1;
repeated Affiliate affiliates = 1;
// Flag that affiliate was deleted, only ID field is valid.
bool deleted = 2;
}
120 changes: 58 additions & 62 deletions api/v1alpha1/pb/cluster.pb.go

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

11 changes: 6 additions & 5 deletions api/v1alpha1/pb/cluster_grpc.pb.go

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

0 comments on commit 6195466

Please sign in to comment.