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
|
// Copyright 2018 Codethink Limited
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package buildstream.v2;
import "build/bazel/remote/execution/v2/remote_execution.proto";
import "google/api/annotations.proto";
service ReferenceStorage {
// Retrieve a CAS [Directory][build.bazel.remote.execution.v2.Directory]
// digest by name.
//
// Errors:
// * `NOT_FOUND`: The requested reference is not in the cache.
rpc GetReference(GetReferenceRequest) returns (GetReferenceResponse) {
option (google.api.http) = { get: "/v2/{instance_name=**}/buildstream/refs/{key}" };
}
// Associate a name with a CAS [Directory][build.bazel.remote.execution.v2.Directory]
// digest.
//
// Errors:
// * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
// entry to the cache.
rpc UpdateReference(UpdateReferenceRequest) returns (UpdateReferenceResponse) {
option (google.api.http) = { put: "/v2/{instance_name=**}/buildstream/refs/{key}" body: "digest" };
}
rpc Status(StatusRequest) returns (StatusResponse) {
option (google.api.http) = { put: "/v2/{instance_name=**}/buildstream/refs:status" };
}
}
message GetReferenceRequest {
// The instance of the execution system to operate against. A server may
// support multiple instances of the execution system (with their own workers,
// storage, caches, etc.). The server MAY require use of this field to select
// between them in an implementation-defined fashion, otherwise it can be
// omitted.
string instance_name = 1;
// The name of the reference.
string key = 2;
}
message GetReferenceResponse {
// The digest of the CAS [Directory][build.bazel.remote.execution.v2.Directory].
build.bazel.remote.execution.v2.Digest digest = 1;
}
message UpdateReferenceRequest {
// The instance of the execution system to operate against. A server may
// support multiple instances of the execution system (with their own workers,
// storage, caches, etc.). The server MAY require use of this field to select
// between them in an implementation-defined fashion, otherwise it can be
// omitted.
string instance_name = 1;
// The name of the reference.
repeated string keys = 2;
// The digest of the CAS [Directory][build.bazel.remote.execution.v2.Directory]
// to store in the cache.
build.bazel.remote.execution.v2.Digest digest = 3;
}
message UpdateReferenceResponse {
}
message StatusRequest {
// The instance of the execution system to operate against. A server may
// support multiple instances of the execution system (with their own workers,
// storage, caches, etc.). The server MAY require use of this field to select
// between them in an implementation-defined fashion, otherwise it can be
// omitted.
string instance_name = 1;
}
message StatusResponse {
// Whether reference updates are allowed for the connected client.
bool allow_updates = 1;
}
|