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 
23 
24 #include <stout/error.hpp>
25 #include <stout/option.hpp>
26 
27 namespace mesos {
28 namespace internal {
29 namespace slave {
30 namespace validation {
31 
32 namespace container {
33 
34 Option<Error> validateContainerId(const ContainerID& containerId);
35 
36 } // namespace container {
37 
38 namespace agent {
39 namespace call {
40 
41 // Validates that an agent::Call is well-formed.
42 // TODO(bmahler): Add unit tests.
44  const mesos::agent::Call& call,
45  const Option<std::string>& principal = None());
46 
47 } // namespace call {
48 } // namespace agent {
49 
50 namespace executor {
51 namespace call {
52 
53 // Validates that an executor call is well-formed.
54 // TODO(ijimenez): Add unit tests.
56 
57 } // namespace call {
58 } // namespace executor {
59 } // namespace validation {
60 } // namespace slave {
61 } // namespace internal {
62 } // namespace mesos {
63 
64 #endif // __SLAVE_VALIDATION_HPP__
mesos::v1::scheduler::Call Call
Definition: mesos.hpp:2601
Option< Error > validateContainerId(const ContainerID &containerId)
Definition: agent.hpp:27
Definition: spec.hpp:30
Definition: none.hpp:27
Definition: attributes.hpp:24
Option< Error > validate(const mesos::executor::Call &call)