Apache Mesos
image_tar_puller.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_IMAGE_TAR_PULLER_HPP__
18 #define __PROVISIONER_DOCKER_IMAGE_TAR_PULLER_HPP__
19 
20 #include <process/owned.hpp>
21 
22 #include <mesos/docker/spec.hpp>
23 
24 #include <mesos/uri/fetcher.hpp>
25 
27 
28 #include "slave/flags.hpp"
29 
30 namespace mesos {
31 namespace internal {
32 namespace slave {
33 namespace docker {
34 
35 // Forward declaration.
36 class ImageTarPullerProcess;
37 
38 
44 class ImageTarPuller : public Puller
45 {
46 public:
48  const Flags& flags,
49  const process::Shared<uri::Fetcher>& fetcher);
50 
51  ~ImageTarPuller() override;
52 
54  const ::docker::spec::ImageReference& reference,
55  const std::string& directory,
56  const std::string& backend,
57  const Option<Secret>& config = None()) override;
58 
59 private:
61 
62  ImageTarPuller(const ImageTarPuller&) = delete; // Not copyable.
63  ImageTarPuller& operator=(const ImageTarPuller&) = delete; // Not assignable.
64 
66 };
67 
68 } // namespace docker {
69 } // namespace slave {
70 } // namespace internal {
71 } // namespace mesos {
72 
73 #endif // __PROVISIONER_DOCKER_IMAGE_TAR_PULLER_HPP__
ImageTarPuller assumes Docker images are stored in a local directory (configured with flags...
Definition: image_tar_puller.hpp:44
Definition: option.hpp:29
Definition: check.hpp:33
Definition: flags.hpp:39
Definition: owned.hpp:26
static Try< process::Owned< Puller > > create(const Flags &flags, const process::Shared< uri::Fetcher > &fetcher)
process::Future< Image > pull(const ::docker::spec::ImageReference &reference, const std::string &directory, const std::string &backend, const Option< Secret > &config=None()) override
Pull a Docker image layers into the specified directory, and return the list of layer ids in that ima...
Definition: agent.hpp:25
Definition: none.hpp:27
Definition: attributes.hpp:24
Definition: executor.hpp:48
Definition: spec.hpp:35
Definition: parse.hpp:33
Definition: future.hpp:58