Apache Mesos
driver.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 __ISOLATOR_DOCKER_VOLUME_DRIVER_HPP__
18 #define __ISOLATOR_DOCKER_VOLUME_DRIVER_HPP__
19 
20 #include <string>
21 
22 #include <process/future.hpp>
23 #include <process/owned.hpp>
24 
25 #include <stout/hashmap.hpp>
26 #include <stout/nothing.hpp>
27 #include <stout/try.hpp>
28 
29 namespace mesos {
30 namespace internal {
31 namespace slave {
32 namespace docker {
33 namespace volume {
34 
45 {
46 public:
51  const std::string& dvdcli);
52 
53  virtual ~DriverClient() {}
54 
61  const std::string& driver,
62  const std::string& name,
63  const hashmap<std::string, std::string>& options);
64 
69  const std::string& driver,
70  const std::string& name);
71 
72 protected:
73  DriverClient() {} // For creating mock object.
74 
75 private:
76  DriverClient(const std::string& _dvdcli)
77  : dvdcli(_dvdcli) {}
78 
79  const std::string dvdcli;
80 };
81 
82 } // namespace volume {
83 } // namespace docker {
84 } // namespace slave {
85 } // namespace internal {
86 } // namespace mesos {
87 
88 #endif // __ISOLATOR_DOCKER_VOLUME_DRIVER_HPP__
Definition: check.hpp:33
virtual ~DriverClient()
Definition: driver.hpp:53
virtual process::Future< Nothing > unmount(const std::string &driver, const std::string &name)
Performs an &#39;unmount&#39;.
static Try< process::Owned< DriverClient > > create(const std::string &dvdcli)
Create a Docker Volume Driver Client.
Definition: agent.hpp:25
Definition: attributes.hpp:24
Abstraction for Docker Volume Driver Client.
Definition: driver.hpp:44
virtual process::Future< std::string > mount(const std::string &driver, const std::string &name, const hashmap< std::string, std::string > &options)
Performs a &#39;mount&#39; and returns the path of the mount point.
Definition: spec.hpp:35
constexpr const char * name
Definition: shell.hpp:41
Definition: future.hpp:58