Apache Mesos
store.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_APPC_STORE_HPP__
18 #define __PROVISIONER_APPC_STORE_HPP__
19 
21 
23 
24 namespace mesos {
25 namespace internal {
26 namespace slave {
27 namespace appc {
28 
29 // Forward declaration.
30 class StoreProcess;
31 
32 
33 class Store : public slave::Store
34 {
35 public:
37  const Flags& flags,
38  SecretResolver* secretResolver = nullptr);
39 
40  ~Store() override;
41 
43 
44  // TODO(xujyan): Fetching remotely is not implemented for now and
45  // until then the future fails directly if the image is not in the
46  // local cache.
47  // TODO(xujyan): The store currently doesn't support images that
48  // have dependencies and we should add it later.
50  const Image& image,
51  const std::string& backend) override;
52 
53 private:
55 
56  Store(const Store&) = delete; // Not copyable.
57  Store& operator=(const Store&) = delete; // Not assignable.
58 
60 };
61 
62 } // namespace appc {
63 } // namespace slave {
64 } // namespace internal {
65 } // namespace mesos {
66 
67 #endif // __PROVISIONER_APPC_STORE_HPP__
Definition: check.hpp:33
Definition: store.hpp:63
Definition: flags.hpp:39
Definition: agent.hpp:25
process::Future< Nothing > recover() override
Definition: store.hpp:33
URI image(const std::string &repository, const std::string &reference, const std::string &registry, const Option< std::string > &scheme=None(), const Option< int > &port=None())
Definition: docker.hpp:30
Definition: attributes.hpp:24
Definition: spec.hpp:28
Definition: executor.hpp:48
Definition: resolver.hpp:34
static Try< process::Owned< slave::Store > > create(const Flags &flags, SecretResolver *secretResolver=nullptr)
Definition: parse.hpp:33