Apache Mesos
copy.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 __URI_FETCHERS_COPY_HPP__
18 #define __URI_FETCHERS_COPY_HPP__
19 
20 #include <process/owned.hpp>
21 
22 #include <stout/flags.hpp>
23 #include <stout/try.hpp>
24 
25 #include <mesos/uri/fetcher.hpp>
26 
27 namespace mesos {
28 namespace uri {
29 
31 {
32 public:
33  class Flags : public virtual flags::FlagsBase {};
34 
35  static const char NAME[];
36 
38 
39  ~CopyFetcherPlugin() override {}
40 
41  std::set<std::string> schemes() const override;
42 
43  std::string name() const override;
44 
46  const URI& uri,
47  const std::string& directory,
48  const Option<std::string>& data = None(),
49  const Option<std::string>& outputFileName = None()) const override;
50 
51 private:
53 };
54 
55 } // namespace uri {
56 } // namespace mesos {
57 
58 #endif // __URI_FETCHERS_COPY_HPP__
Definition: check.hpp:33
std::string name() const override
Returns the name that this plugin registered with.
static const char NAME[]
Definition: copy.hpp:35
static Try< process::Owned< Fetcher::Plugin > > create(const Flags &flags)
process::Future< Nothing > fetch(const URI &uri, const std::string &directory, const Option< std::string > &data=None(), const Option< std::string > &outputFileName=None()) const override
Fetches a URI to the given directory.
Definition: flags.hpp:44
Definition: agent.hpp:25
std::set< std::string > schemes() const override
Returns the URI schemes that this plugin handles.
~CopyFetcherPlugin() override
Definition: copy.hpp:39
Definition: none.hpp:27
Definition: copy.hpp:30
Definition: uri.hpp:21
Definition: parse.hpp:33
Represents a fetcher plugin that handles one or more URI schemes.
Definition: fetcher.hpp:52