-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathmirrormanager.proto
115 lines (100 loc) · 2.98 KB
/
mirrormanager.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
syntax = "proto2";
/* Generate python files with:
$ protoc --python_out=mirrormanager2/lib mirrormanager.proto
Unfortunately it is not possible to use Protobuf maps as
RHEL7/CentOS7's Protobuf is too old.
*/
package mirrormanager;
message FileDetailsType {
required uint64 TimeStamp = 1;
required uint64 Size = 2;
optional string SHA1 = 3;
optional string MD5 = 4;
optional string SHA256 = 5;
optional string SHA512 = 6;
}
message FileDetailsCacheFilesType {
/* filename, [{details}] (this is a list) */
required string filename = 1;
repeated FileDetailsType FileDetails = 2;
}
message FileDetailsCacheDirectoryType {
required string directory = 1;
repeated FileDetailsCacheFilesType FileDetailsCacheFiles = 2;
}
message MirrorListCacheType {
/* directoryname */
required string directory = 1;
/* 'global': set() */
repeated int64 Global = 2;
/* subpath */
optional string Subpath = 3;
/* country, set(hostid) */
repeated StringRepeatedIntMap ByCountry = 4;
/* country, set(hostid) */
repeated StringRepeatedIntMap ByCountryInternet2 = 5;
/* hostid, [hcurl] */
repeated IntRepeatedIntMap ByHostId = 6;
optional bool OrderedMirrorList = 7;
}
message StringStringMap {
required string key = 1;
required string value = 2;
}
message StringRepeatedIntMap {
required string key = 1;
repeated int64 value = 2;
}
message IntRepeatedStringMap {
required int64 key = 1;
repeated string value = 2;
}
message IntStringMap {
required int64 key = 1;
required string value = 2;
}
message IntIntMap {
required int64 key = 1;
required int64 value = 2;
}
message IntRepeatedIntMap {
required int64 key = 1;
repeated int64 value = 2;
}
message StringBoolMap {
required string key = 1;
required bool value = 2;
}
message MirrorList {
required uint64 Time = 1;
/* IP, country */
repeated StringStringMap NetblockCountryCache = 2;
/* location.name, [host.id] */
repeated StringRepeatedIntMap LocationCache = 3;
/* hcurl.id, hcurl.url */
repeated IntStringMap HCUrlCache = 4;
/* directoryname, {filename}[{details}] */
repeated FileDetailsCacheDirectoryType FileDetailsCache = 5;
/* r.prefix, bool */
repeated StringBoolMap DisabledRepositoryCache = 6;
/* c.country, c.continent */
repeated StringStringMap CountryContinentRedirectCache = 7;
/* r.from_repo, r.to_repo */
repeated StringStringMap RepositoryRedirectCache = 8;
/* repo.prefix+repo.arch.name, directoryname */
repeated StringStringMap RepoArchToDirectoryName = 9;
/* asn, [host.id] */
repeated IntRepeatedIntMap HostAsnCache = 10;
/* host.id, host.max_connections */
repeated IntIntMap HostMaxConnectionCache = 11;
/* host.id, host.country */
repeated IntStringMap HostCountryCache = 12;
/* host.id, host.bandwidth_int */
repeated IntIntMap HostBandwidthCache = 13;
/* host.id, [list(host.countries_allowed)] */
repeated IntRepeatedStringMap HostCountryAllowedCache = 14;
/* IP, [host.id] */
repeated StringRepeatedIntMap HostNetblockCache = 15;
/* directoryname, * */
repeated MirrorListCacheType MirrorListCache = 16;
}