Apache Mesos
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
src
slave
containerizer
mesos
provisioner
docker
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_DOCKER_STORE_HPP__
18
#define __PROVISIONER_DOCKER_STORE_HPP__
19
20
#include <
mesos/secret/resolver.hpp
>
21
22
#include <
process/owned.hpp
>
23
24
#include <
stout/hashset.hpp
>
25
#include <
stout/try.hpp
>
26
27
#include "
slave/flags.hpp
"
28
29
#include "
slave/containerizer/mesos/provisioner/store.hpp
"
30
31
namespace
mesos
{
32
namespace
internal
{
33
namespace
slave {
34
namespace
docker
{
35
36
// Forward Declarations.
37
class
Puller;
38
class
StoreProcess;
39
40
41
// Store fetches the Docker images and stores them on disk.
42
class
Store
:
public
slave::Store
43
{
44
public
:
45
static
Try<process::Owned<slave::Store>
>
create
(
46
const
Flags
&
flags
,
47
SecretResolver
* secretResolver =
nullptr
);
48
49
// This allows the puller to be mocked for testing.
50
static
Try<process::Owned<slave::Store>
>
create
(
51
const
Flags
& flags,
52
const
process::Owned<Puller>
& puller);
53
54
~Store
()
override
;
55
56
process::Future<Nothing>
recover
()
override
;
57
58
process::Future<ImageInfo>
get
(
59
const
mesos::Image&
image
,
60
const
std::string& backend)
override
;
61
62
process::Future<Nothing>
prune
(
63
const
std::vector<mesos::Image>& excludeImages,
64
const
hashset<std::string>
& activeLayerPaths)
override
;
65
66
private
:
67
explicit
Store
(
process::Owned<StoreProcess>
process
);
68
69
Store
& operator=(
const
Store
&) =
delete
;
// Not assignable.
70
Store
(
const
Store
&) =
delete
;
// Not copyable.
71
72
process::Owned<StoreProcess>
process;
73
};
74
75
}
// namespace docker {
76
}
// namespace slave {
77
}
// namespace internal {
78
}
// namespace mesos {
79
80
#endif // __PROVISIONER_DOCKER_STORE_HPP__
resolver.hpp
mesos::internal::slave::docker::Store::create
static Try< process::Owned< slave::Store > > create(const Flags &flags, SecretResolver *secretResolver=nullptr)
Try
Definition:
check.hpp:33
mesos::internal::slave::docker::Store::prune
process::Future< Nothing > prune(const std::vector< mesos::Image > &excludeImages, const hashset< std::string > &activeLayerPaths) override
hashset< std::string >
mesos::internal::slave::docker::Store::recover
process::Future< Nothing > recover() override
mesos::internal::slave::Store
Definition:
store.hpp:63
mesos::internal::slave::Flags
Definition:
flags.hpp:39
mesos::internal::slave::docker::Store::~Store
~Store() override
mesos::internal::slave::docker::Store
Definition:
store.hpp:42
mesos
Definition:
agent.hpp:25
mesos::uri::docker::image
URI image(const std::string &repository, const std::string &reference, const std::string ®istry, const Option< std::string > &scheme=None(), const Option< int > &port=None())
Definition:
docker.hpp:30
internal
Definition:
attributes.hpp:24
store.hpp
process
Definition:
executor.hpp:48
try.hpp
hashset.hpp
flags.hpp
owned.hpp
mesos::SecretResolver
Definition:
resolver.hpp:34
docker
Definition:
spec.hpp:35
process::Owned
Definition:
owned.hpp:36
flags
Definition:
parse.hpp:33
process::Future< Nothing >
Generated by
1.8.11