gebn / ttlcache

Distributed cache library with support for TTLs and coordinated loads.
Apache License 2.0
1 stars 1 forks source link

gRPC #5

Open gebn opened 3 years ago

gebn commented 3 years ago

Include .pb.go file(s) so no requirement to run protoc locally. Something like:

syntax = "proto3";

import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";

message Lifetime {
    google.protobuf.Timestamp created = 1;
    google.protobuf.Duration ttl = 2;
}

message PeerLoadRequest {
    string cache = 1;
    string key = 2;
}

message PeerLoadReply {
    bytes value = 1;
    Lifetime lifetime = 2;
}

service PeerLoader {
    rpc PeerLoad(PeerLoadRequest) returns (PeerLoadReply) {}
}
gebn commented 3 years ago

This should be extended to the public interface for #1.