Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCacheServer ¶
type ActionCacheServer struct {
// contains filtered or unexported fields
}
func NewActionCacheServer ¶
func NewActionCacheServer(env environment.Env) (*ActionCacheServer, error)
func (*ActionCacheServer) GetActionResult ¶
func (s *ActionCacheServer) GetActionResult(ctx context.Context, req *repb.GetActionResultRequest) (*repb.ActionResult, error)
Retrieve a cached execution result.
Implementations SHOULD ensure that any blobs referenced from the [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] are available at the time of returning the [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be for some period of time afterwards. The TTLs of the referenced blobs SHOULD be increased if necessary and applicable.
Errors:
* `NOT_FOUND`: The requested `ActionResult` is not in the cache.
func (*ActionCacheServer) UpdateActionResult ¶
func (s *ActionCacheServer) UpdateActionResult(ctx context.Context, req *repb.UpdateActionResultRequest) (*repb.ActionResult, error)
Upload a new execution result.
In order to allow the server to perform access control based on the type of action, and to assist with client debugging, the client MUST first upload the [Action][build.bazel.remote.execution.v2.Execution] that produced the result, along with its [Command][build.bazel.remote.execution.v2.Command], into the `ContentAddressableStorage`.
Errors:
- `INVALID_ARGUMENT`: One or more arguments are invalid.
- `FAILED_PRECONDITION`: One or more errors occurred in updating the action result, such as a missing command or action.
- `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the entry to the cache.