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
//! The port through which a build asks a remote cache for a result, stores one there, and asks
//! it to run an action.
//!
//! Its own file because a remote cache is a different kind of store from the local one: it is
//! keyed by a description of the work rather than by buildl's own key, it answers with a result
//! that has not been checked, and it is reached over a network by several workers at once.
//!
//! Responsibilities: [`RemoteCache`] and [`BlobSource`].
//!
//! Non-responsibilities: implementing them, and judging what a remote answers. The first belongs
//! to an adapter crate; the second to the phase that executes, which checks every answer before
//! it uses one. An adapter only moves and encodes.
//!
//! This file holds only trait definitions, so it carries no logic to unit-test.
use crateResult;
use crate;
/// A cache of results shared between machines, asked and filled by the action that made them,
/// and able to run an action itself.
///
/// Blocking, and called from several worker threads at once. Every failure is an
/// [`Error::Adapter`](crate::Error::Adapter) naming
/// [`PortName::RemoteCache`](crate::PortName::RemoteCache); a miss is not a failure.
/// Where the bytes of the blobs an upload names are read from.
///
/// It lets a remote adapter read what the local content store holds without importing the store.