| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you 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. |
| |
| import "mesos/mesos.proto"; |
| |
| package mesos.fetcher; |
| |
| option java_package = "org.apache.mesos.fetcher"; |
| option java_outer_classname = "Protos"; |
| |
| /** |
| * Encodes the fetcher environment variable sent to the external fetcher |
| * program. See also "docs/fetcher.md" and |
| * "docs/fetcher-cache-internals.md". Note that part of these |
| * definitions are quoted verbatim in "docs/fetcher.md" and must be |
| * updated there whenever they change here. |
| */ |
| message FetcherInfo { |
| message Item |
| { |
| // What action the fetcher program is supposed to perform for a |
| // given URI. |
| enum Action |
| { |
| // Bypass the cache, download directly into the sandbox directory. |
| BYPASS_CACHE = 0; |
| |
| // Download a resource at the given URI to the fetcher's file cache. |
| // Then retrieve the resource from the cache into the sandbox |
| // directory. |
| DOWNLOAD_AND_CACHE = 1; |
| |
| // Copy or extract the resource from the cache, without downloading. |
| RETRIEVE_FROM_CACHE = 2; |
| } |
| |
| required CommandInfo.URI uri = 1; |
| required Action action = 2; |
| optional string cache_filename = 3; |
| } |
| |
| // Must be present when fetching into the sandbox in any way. |
| required string sandbox_directory = 1; |
| |
| // Optional so that fetch requests that only use BYPASS_CACHE do not |
| // need to specify an unused cache directory. |
| optional string cache_directory = 2; |
| |
| repeated Item items = 3; |
| optional string user = 4; |
| optional string frameworks_home = 5; |
| } |