Apache Mesos
validation.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 __SLAVE_VALIDATION_HPP__
18 #define __SLAVE_VALIDATION_HPP__
19 
20 #include <mesos/agent/agent.hpp>
21 
22 #include <stout/error.hpp>
23 #include <stout/option.hpp>
24 
25 namespace mesos {
26 namespace internal {
27 namespace slave {
28 namespace validation {
29 
30 namespace container {
31 
32 Option<Error> validateContainerId(const ContainerID& containerId);
33 
34 } // namespace container {
35 
36 namespace agent {
37 namespace call {
38 
39 // Validates that an agent::Call is well-formed.
40 // TODO(bmahler): Add unit tests.
42  const mesos::agent::Call& call,
43  const Option<std::string>& principal = None());
44 
45 } // namespace call {
46 } // namespace agent {
47 
48 } // namespace validation {
49 } // namespace slave {
50 } // namespace internal {
51 } // namespace mesos {
52 
53 #endif // __SLAVE_VALIDATION_HPP__
Option< Error > validate(const mesos::agent::Call &call, const Option< std::string > &principal=None())
mesos::v1::scheduler::Call Call
Definition: mesos.hpp:2616
Option< Error > validateContainerId(const ContainerID &containerId)
Definition: agent.hpp:27
Definition: spec.hpp:26
Definition: none.hpp:27
Definition: attributes.hpp:24