add function to apply mutations over grpc
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user