Apache Mesos
manager.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 __RESOURCE_PROVIDER_MANAGER_HPP__
18 #define __RESOURCE_PROVIDER_MANAGER_HPP__
19 
21 #include <process/future.hpp>
22 #include <process/http.hpp>
23 #include <process/owned.hpp>
24 #include <process/queue.hpp>
25 
26 #include "messages/messages.hpp"
27 
29 
30 namespace mesos {
31 namespace internal {
32 
33 // Forward declarations.
34 class ResourceProviderManagerProcess;
35 
36 
38 {
39 public:
42 
44  const ResourceProviderManager& other) = delete;
45 
47  const ResourceProviderManager& other) = delete;
48 
49  // The API endpoint handler.
53 
54  void applyOperation(const ApplyOperationMessage& message) const;
55 
56  // Forwards an operation status acknowledgement to the relevant
57  // resource provider.
59  const AcknowledgeOperationStatusMessage& message) const;
60 
61  // Forwards operation reconciliation requests from the master to the
62  // relevant resource providers.
64  const ReconcileOperationsMessage& message) const;
65 
66  // Ensure that the resources are ready for use.
68 
69  // Returns a stream of messages from the resource provider manager.
71 
72 private:
74 };
75 
76 } // namespace internal {
77 } // namespace mesos {
78 
79 #endif // __RESOURCE_PROVIDER_MANAGER_HPP__
void applyOperation(const ApplyOperationMessage &message) const
Future< Response > request(const Request &request, bool streamedResponse=false)
Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...
process::Queue< ResourceProviderMessage > messages() const
Definition: resources.hpp:79
Definition: http.hpp:518
ResourceProviderManager & operator=(const ResourceProviderManager &other)=delete
void reconcileOperations(const ReconcileOperationsMessage &message) const
Definition: spec.hpp:30
Definition: attributes.hpp:24
Definition: queue.hpp:29
Definition: executor.hpp:47
void acknowledgeOperationStatus(const AcknowledgeOperationStatusMessage &message) const
process::Future< Nothing > publishResources(const Resources &resources)
process::Future< process::http::Response > api(const process::http::Request &request, const Option< process::http::authentication::Principal > &principal) const
Definition: future.hpp:57