Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
IDobbyStartState.h
1 /*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2016 Sky UK
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 /*
20  * File: IDobbyStartState.h
21  *
22  */
23 #ifndef IDOBBYSTARTSTATE_H
24 #define IDOBBYSTARTSTATE_H
25 
26 #include <list>
27 #include <string>
28 
29 #include <sys/mount.h>
30 
31 // -----------------------------------------------------------------------------
40 {
41 public:
42  virtual ~IDobbyStartState() = default;
43 
44 public:
45  // -------------------------------------------------------------------------
68  virtual int addFileDescriptor(const std::string& pluginName, int fd) = 0;
69 
70  // -------------------------------------------------------------------------
80  virtual bool addEnvironmentVariable(const std::string& envVar) = 0;
81 
82  // -------------------------------------------------------------------------
99  virtual bool addMount(const std::string& source,
100  const std::string& target,
101  const std::string& fsType,
102  unsigned long mountFlags = 0,
103  const std::list<std::string>& mountOptions = std::list<std::string>()) = 0;
104 
105  // -------------------------------------------------------------------------
111  virtual std::list<int> files() const = 0;
112 
113  // -------------------------------------------------------------------------
121  virtual std::list<int> files(const std::string& pluginName) const = 0;
122 
123 };
124 
125 
126 #endif // !defined(IDOBBYSTARTSTATE_H)
Utility interface passed in at the post-construction phase, to allow some final tweaking of the conta...
Definition: IDobbyStartState.h:40
virtual std::list< int > files(const std::string &pluginName) const =0
Gets all file descriptor registered by concrete client.
virtual std::list< int > files() const =0
Gets all file descriptor registered by any client.
virtual bool addEnvironmentVariable(const std::string &envVar)=0
Adds an environment variable to the container.
virtual int addFileDescriptor(const std::string &pluginName, int fd)=0
Adds another file descriptor to be passed into the container.
virtual bool addMount(const std::string &source, const std::string &target, const std::string &fsType, unsigned long mountFlags=0, const std::list< std::string > &mountOptions=std::list< std::string >())=0
Adds a new mount to the container.