add function to apply mutations over grpc
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 41s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m50s

This commit is contained in:
matst80
2025-11-28 14:07:43 +01:00
parent 2c0f6c160a
commit 47e69f18a5
12 changed files with 1015 additions and 74 deletions

View File

@@ -4,6 +4,8 @@ package messages;
option go_package = "git.k6n.net/go-cart-actor/proto;messages";
import "messages.proto";
// -----------------------------------------------------------------------------
// Control Plane gRPC API
// -----------------------------------------------------------------------------
@@ -65,6 +67,16 @@ message ExpiryAnnounce {
repeated uint64 ids = 2;
}
message ApplyRequest {
uint64 id = 1;
repeated Mutation messages = 2;
}
message ApplyResult {
bool accepted = 1;
}
// ControlPlane defines cluster coordination and ownership operations.
service ControlPlane {
// Ping for liveness; lightweight health signal.
@@ -80,6 +92,7 @@ service ControlPlane {
// Ownership announcement: first-touch claim broadcast (idempotent; best-effort).
rpc AnnounceOwnership(OwnershipAnnounce) returns (OwnerChangeAck);
rpc Apply(ApplyRequest) returns (ApplyResult);
// Expiry announcement: drop remote ownership hints when local TTL expires.
rpc AnnounceExpiry(ExpiryAnnounce) returns (OwnerChangeAck);