1/*
2Copyright 2012 Google Inc.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17syntax = "proto2";
18
19package testpb;
20
21message TestMessage {
22  optional string name = 1;
23  optional string city = 2;
24}
25
26message TestRequest {
27  required string lower = 1; // to be returned upper case
28  optional int32 repeat_count = 2 [default = 1]; // .. this many times
29}
30
31message TestResponse {
32  optional string value = 1;
33}
34
35message CacheStats {
36  optional int64 items = 1;
37  optional int64 bytes = 2;
38  optional int64 gets = 3;
39  optional int64 hits = 4;
40  optional int64 evicts = 5;
41}
42
43message StatsResponse {
44  optional int64 gets = 1;
45  optional int64 cache_hits = 12;
46  optional int64 fills = 2;
47  optional uint64 total_alloc = 3;
48  optional CacheStats main_cache = 4;
49  optional CacheStats hot_cache = 5;
50  optional int64 server_in = 6;
51  optional int64 loads = 8;
52  optional int64 peer_loads = 9;
53  optional int64 peer_errors = 10;
54  optional int64 local_loads = 11;
55}
56
57message Empty {}
58
59service GroupCacheTest {
60  rpc InitPeers(Empty) returns (Empty) {};
61  rpc Get(TestRequest) returns (TestResponse) {};
62  rpc GetStats(Empty) returns (StatsResponse) {};
63}
64