Apache Mesos
paths.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __PROVISIONER_DOCKER_PATHS_HPP__
18 #define __PROVISIONER_DOCKER_PATHS_HPP__
19 
20 #include <list>
21 #include <string>
22 
23 #include <stout/try.hpp>
24 
25 namespace mesos {
26 namespace internal {
27 namespace slave {
28 namespace docker {
29 namespace paths {
30 
49 // TODO(gilbert): Clean up any unused method after refactoring.
50 std::string getStagingDir(const std::string& storeDir);
51 
52 
53 std::string getStagingTempDir(const std::string& storeDir);
54 
55 
56 std::string getImageLayerPath(
57  const std::string& storeDir,
58  const std::string& layerId);
59 
60 
61 std::string getImageLayerManifestPath(
62  const std::string& layerPath);
63 
64 
65 std::string getImageLayerManifestPath(
66  const std::string& storeDir,
67  const std::string& layerId);
68 
69 
70 std::string getImageLayerRootfsPath(
71  const std::string& layerPath,
72  const std::string& backend);
73 
74 
75 std::string getImageLayerRootfsPath(
76  const std::string& storeDir,
77  const std::string& layerId,
78  const std::string& backend);
79 
80 
81 std::string getImageLayerTarPath(
82  const std::string& layerPath);
83 
84 
85 std::string getImageLayerTarPath(
86  const std::string& storeDir,
87  const std::string& layerId);
88 
89 
90 std::string getImageArchiveTarPath(
91  const std::string& discoveryDir,
92  const std::string& name);
93 
94 
95 std::string getStoredImagesPath(const std::string& storeDir);
96 
97 
98 std::string getGcDir(const std::string& storeDir);
99 
100 
101 std::string getGcLayerPath(
102  const std::string& storeDir,
103  const std::string& layerId);
104 
105 
106 Try<std::list<std::string>> listLayers(const std::string& storeDir);
107 
108 } // namespace paths {
109 } // namespace docker {
110 } // namespace slave {
111 } // namespace internal {
112 } // namespace mesos {
113 
114 #endif // __PROVISIONER_DOCKER_PATHS_HPP__
std::string getStagingDir(const std::string &storeDir)
The Docker store file system layout is as follows: Image store dir (&#39;–docker_store_dir&#39; slave flag) ...
std::string getStagingTempDir(const std::string &storeDir)
std::string getGcLayerPath(const std::string &storeDir, const std::string &layerId)
Definition: check.hpp:33
std::string paths()
Definition: os.hpp:136
Try< std::list< std::string > > listLayers(const std::string &storeDir)
std::string getImageLayerTarPath(const std::string &layerPath)
std::string getImageLayerRootfsPath(const std::string &layerPath, const std::string &backend)
std::string getImageLayerPath(const std::string &storeDir, const std::string &layerId)
Definition: spec.hpp:30
std::string getImageArchiveTarPath(const std::string &discoveryDir, const std::string &name)
std::string getStoredImagesPath(const std::string &storeDir)
std::string getGcDir(const std::string &storeDir)
Definition: attributes.hpp:24
std::string getImageLayerManifestPath(const std::string &layerPath)
Definition: spec.hpp:34
constexpr const char * name
Definition: shell.hpp:43