![JAR search and dependency download from the Maven repository](/logo.png)
.akka.grpc.akka-grpc-interop-tests_3.2.3.4.source-code.crdt-example.proto Maven / Gradle / Ivy
syntax = "proto3";
import "google/protobuf/empty.proto";
package com.example.crdts;
message UpdateCounter {
string key = 1;
int64 value = 2;
}
message CounterValue {
int64 value = 1;
}
message Get {
string key = 1;
}
message SomeValue {
string key = 1;
string description = 2;
}
message MutateSet {
string key = 1;
bool clear = 2;
repeated SomeValue remove = 3;
repeated SomeValue add = 4;
}
message SetSize {
int32 size = 1;
}
message SetValue {
repeated SomeValue items = 1;
}
message User {
string name = 1;
}
message OnlineStatus {
bool online = 1;
}
service CrdtExample {
rpc IncrementGCounter(UpdateCounter) returns (CounterValue);
rpc GetGCounter(Get) returns (CounterValue);
rpc UpdatePNCounter(UpdateCounter) returns (CounterValue);
rpc GetPNCounter(Get) returns (CounterValue);
rpc MutateGSet(MutateSet) returns (SetSize);
rpc GetGSet(Get) returns (SetValue);
rpc MutateORSet(MutateSet) returns (SetSize);
rpc GetORSet(Get) returns (SetValue);
// Connect the given user. They will stay connected as long as the stream stays open.
rpc Connect(User) returns (stream google.protobuf.Empty);
// Monitor the online status of the given user.
rpc Monitor(User) returns (stream OnlineStatus);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy