Apache Mesos
local_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_LOCAL_PULLER_HPP__
18 #define __PROVISIONER_DOCKER_LOCAL_PULLER_HPP__
19 
20 #include <process/owned.hpp>
21 
22 #include <mesos/docker/spec.hpp>
23 
25 
26 #include "slave/flags.hpp"
27 
28 namespace mesos {
29 namespace internal {
30 namespace slave {
31 namespace docker {
32 
33 // Forward declaration.
34 class LocalPullerProcess;
35 
36 
42 class LocalPuller : public Puller
43 {
44 public:
46 
47  ~LocalPuller();
48 
50  const ::docker::spec::ImageReference& reference,
51  const std::string& directory,
52  const std::string& backend,
53  const Option<Secret>& config = None());
54 
55 private:
57 
58  LocalPuller(const LocalPuller&) = delete; // Not copyable.
59  LocalPuller& operator=(const LocalPuller&) = delete; // Not assignable.
60 
62 };
63 
64 } // namespace docker {
65 } // namespace slave {
66 } // namespace internal {
67 } // namespace mesos {
68 
69 #endif // __PROVISIONER_DOCKER_LOCAL_PULLER_HPP__
Definition: option.hpp:28
Definition: try.hpp:34
static Try< process::Owned< Puller > > create(const Flags &flags)
Definition: flags.hpp:39
#define flags
Definition: decoder.hpp:18
Definition: none.hpp:27
LocalPuller assumes Docker images are stored in a local directory (configured with flags...
Definition: local_puller.hpp:42
process::Future< std::vector< std::string > > pull(const ::docker::spec::ImageReference &reference, const std::string &directory, const std::string &backend, const Option< Secret > &config=None())
Pull a Docker image layers into the specified directory, and return the list of layer ids in that ima...
Definition: future.hpp:57