OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / golang / groupcache / testpb / test.proto
1 /*
2 Copyright 2012 Google Inc.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 syntax = "proto2";
18
19 package testpb;
20
21 message TestMessage {
22   optional string name = 1;
23   optional string city = 2;
24 }
25
26 message TestRequest {
27   required string lower = 1; // to be returned upper case
28   optional int32 repeat_count = 2 [default = 1]; // .. this many times
29 }
30
31 message TestResponse {
32   optional string value = 1;
33 }
34
35 message 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
43 message 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
57 message Empty {}
58
59 service GroupCacheTest {
60   rpc InitPeers(Empty) returns (Empty) {};
61   rpc Get(TestRequest) returns (TestResponse) {};
62   rpc GetStats(Empty) returns (StatsResponse) {};
63 }