Apache Mesos
type_utils.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 __MESOS_TYPE_UTILS_H__
18 #define __MESOS_TYPE_UTILS_H__
19 
20 #include <iosfwd>
21 #include <string>
22 #include <vector>
23 
24 #include <boost/functional/hash.hpp>
25 
26 #include <google/protobuf/map.h>
27 #include <google/protobuf/repeated_field.h>
28 
29 #include <google/protobuf/util/message_differencer.h>
30 
31 #include <mesos/mesos.hpp>
32 
33 #include <stout/stringify.hpp>
34 #include <stout/strings.hpp>
35 #include <stout/uuid.hpp>
36 
37 // This file includes definitions for operators on public protobuf
38 // classes (defined in mesos.proto, module.proto, etc.) that don't
39 // have these operators generated by the protobuf compiler. The
40 // corresponding definitions are in src/common/type_utils.cpp.
41 //
42 // Mesos modules need some of the protobuf classes defined in
43 // mesos.proto, module.proto, etc., and require some of these
44 // operators declared in type_utils.hpp. Exposing type_utils.hpp
45 // allows us to build modules without having a dependency on mesos
46 // source tree (src/*).
47 
48 namespace mesos {
49 
50 bool operator==(const CheckStatusInfo& left, const CheckStatusInfo& right);
51 bool operator==(const CommandInfo& left, const CommandInfo& right);
52 bool operator==(const CommandInfo::URI& left, const CommandInfo::URI& right);
53 bool operator==(const ContainerID& left, const ContainerID& right);
54 bool operator==(const ContainerInfo& left, const ContainerInfo& right);
55 bool operator==(const Credential& left, const Credential& right);
56 bool operator==(const CSIPluginInfo& left, const CSIPluginInfo& right);
57 
58 bool operator==(
59  const CSIPluginContainerInfo& left,
60  const CSIPluginContainerInfo& right);
61 
62 bool operator==(const DiscoveryInfo& left, const DiscoveryInfo& right);
63 bool operator==(const Environment& left, const Environment& right);
64 bool operator==(const ExecutorInfo& left, const ExecutorInfo& right);
65 bool operator==(const HealthCheck& left, const HealthCheck& right);
66 bool operator==(const KillPolicy& left, const KillPolicy& right);
67 bool operator==(const Label& left, const Label& right);
68 bool operator==(const Labels& left, const Labels& right);
69 bool operator==(const MasterInfo& left, const MasterInfo& right);
70 bool operator==(const Offer::Operation& left, const Offer::Operation& right);
71 bool operator==(const Operation& left, const Operation& right);
72 bool operator==(const OperationStatus& left, const OperationStatus& right);
73 
74 bool operator==(
75  const ResourceProviderInfo& left,
76  const ResourceProviderInfo& right);
77 
78 bool operator==(
79  const ResourceStatistics& left,
80  const ResourceStatistics& right);
81 
82 bool operator==(const SlaveInfo& left, const SlaveInfo& right);
83 bool operator==(const Task& left, const Task& right);
84 bool operator==(const TaskGroupInfo& left, const TaskGroupInfo& right);
85 bool operator==(const TaskInfo& left, const TaskInfo& right);
86 bool operator==(const TaskStatus& left, const TaskStatus& right);
87 bool operator==(const URL& left, const URL& right);
88 bool operator==(const UUID& left, const UUID& right);
89 bool operator==(const Volume& left, const Volume& right);
90 
91 bool operator!=(const CheckStatusInfo& left, const CheckStatusInfo& right);
92 bool operator!=(const ExecutorInfo& left, const ExecutorInfo& right);
93 bool operator!=(const Labels& left, const Labels& right);
94 bool operator!=(const Offer::Operation& left, const Offer::Operation& right);
95 bool operator!=(const Operation& left, const Operation& right);
96 bool operator!=(const OperationStatus& left, const OperationStatus& right);
97 
98 bool operator!=(const TaskStatus& left, const TaskStatus& right);
99 
100 inline bool operator==(const ExecutorID& left, const ExecutorID& right)
101 {
102  return left.value() == right.value();
103 }
104 
105 
106 inline bool operator==(const FrameworkID& left, const FrameworkID& right)
107 {
108  return left.value() == right.value();
109 }
110 
111 
112 inline bool operator==(const FrameworkInfo& left, const FrameworkInfo& right)
113 {
114  return (left.name() == right.name()) && (left.user() == right.user());
115 }
116 
117 
118 inline bool operator==(const OfferID& left, const OfferID& right)
119 {
120  return left.value() == right.value();
121 }
122 
123 
124 inline bool operator==(const OperationID& left, const OperationID& right)
125 {
126  return left.value() == right.value();
127 }
128 
129 
130 inline bool operator==(
131  const ResourceProviderID& left,
132  const ResourceProviderID& right)
133 {
134  return left.value() == right.value();
135 }
136 
137 
138 inline bool operator==(const SlaveID& left, const SlaveID& right)
139 {
140  return left.value() == right.value();
141 }
142 
143 
144 inline bool operator==(const TaskID& left, const TaskID& right)
145 {
146  return left.value() == right.value();
147 }
148 
149 
150 inline bool operator==(const TimeInfo& left, const TimeInfo& right)
151 {
152  return left.nanoseconds() == right.nanoseconds();
153 }
154 
155 
156 inline bool operator==(const DurationInfo& left, const DurationInfo& right)
157 {
158  return left.nanoseconds() == right.nanoseconds();
159 }
160 
161 
162 inline bool operator==(const ContainerID& left, const std::string& right)
163 {
164  return left.value() == right;
165 }
166 
167 
168 inline bool operator==(const ExecutorID& left, const std::string& right)
169 {
170  return left.value() == right;
171 }
172 
173 
174 inline bool operator==(const FrameworkID& left, const std::string& right)
175 {
176  return left.value() == right;
177 }
178 
179 
180 inline bool operator==(const OfferID& left, const std::string& right)
181 {
182  return left.value() == right;
183 }
184 
185 
186 inline bool operator==(const SlaveID& left, const std::string& right)
187 {
188  return left.value() == right;
189 }
190 
191 
192 inline bool operator==(const TaskID& left, const std::string& right)
193 {
194  return left.value() == right;
195 }
196 
197 
198 inline bool operator==(
199  const DomainInfo::FaultDomain::RegionInfo& left,
200  const DomainInfo::FaultDomain::RegionInfo& right)
201 {
202  return left.name() == right.name();
203 }
204 
205 
206 inline bool operator==(
207  const DomainInfo::FaultDomain::ZoneInfo& left,
208  const DomainInfo::FaultDomain::ZoneInfo& right)
209 {
210  return left.name() == right.name();
211 }
212 
213 
214 inline bool operator==(
215  const DomainInfo::FaultDomain& left,
216  const DomainInfo::FaultDomain& right)
217 {
218  return left.region() == right.region() && left.zone() == right.zone();
219 }
220 
221 
222 inline bool operator==(const DomainInfo& left, const DomainInfo& right)
223 {
224  return left.fault_domain() == right.fault_domain();
225 }
226 
227 
228 inline bool operator==(const DrainInfo& left, const DrainInfo& right)
229 {
230  return google::protobuf::util::MessageDifferencer::Equals(left, right);
231 }
232 
233 
234 inline bool operator==(const DrainConfig& left, const DrainConfig& right)
235 {
236  return google::protobuf::util::MessageDifferencer::Equals(left, right);
237 }
238 
239 
244 inline bool operator==(const MachineID& left, const MachineID& right)
245 {
246  // NOTE: Both fields default to the empty string if they are not specified,
247  // so the string comparisons are safe.
248  return left.has_hostname() == right.has_hostname() &&
249  strings::lower(left.hostname()) == strings::lower(right.hostname()) &&
250  left.has_ip() == right.has_ip() &&
251  left.ip() == right.ip();
252 }
253 
254 
255 inline bool operator!=(const ContainerID& left, const ContainerID& right)
256 {
257  return !(left == right);
258 }
259 
260 
261 inline bool operator!=(
262  const CSIPluginContainerInfo& left,
263  const CSIPluginContainerInfo& right)
264 {
265  return !(left == right);
266 }
267 
268 
269 inline bool operator!=(const ExecutorID& left, const ExecutorID& right)
270 {
271  return left.value() != right.value();
272 }
273 
274 
275 inline bool operator!=(const FrameworkID& left, const FrameworkID& right)
276 {
277  return left.value() != right.value();
278 }
279 
280 
281 inline bool operator!=(const OperationID& left, const OperationID& right)
282 {
283  return left.value() != right.value();
284 }
285 
286 
287 inline bool operator!=(
288  const ResourceProviderID& left,
289  const ResourceProviderID& right)
290 {
291  return left.value() != right.value();
292 }
293 
294 
295 inline bool operator!=(const SlaveID& left, const SlaveID& right)
296 {
297  return left.value() != right.value();
298 }
299 
300 
301 inline bool operator!=(
302  const ResourceProviderInfo& left,
303  const ResourceProviderInfo& right)
304 {
305  return !(left == right);
306 }
307 
308 
309 inline bool operator!=(const TimeInfo& left, const TimeInfo& right)
310 {
311  return !(left == right);
312 }
313 
314 
315 inline bool operator!=(const UUID& left, const UUID& right)
316 {
317  return !(left == right);
318 }
319 
320 
321 inline bool operator!=(const DurationInfo& left, const DurationInfo& right)
322 {
323  return !(left == right);
324 }
325 
326 
327 inline bool operator!=(
328  const DomainInfo::FaultDomain::RegionInfo& left,
329  const DomainInfo::FaultDomain::RegionInfo& right)
330 {
331  return left.name() != right.name();
332 }
333 
334 
335 inline bool operator<(const ContainerID& left, const ContainerID& right)
336 {
337  return left.value() < right.value();
338 }
339 
340 
341 inline bool operator<(const DurationInfo& left, const DurationInfo& right)
342 {
343  return left.nanoseconds() < right.nanoseconds();
344 }
345 
346 
347 inline bool operator<(const ExecutorID& left, const ExecutorID& right)
348 {
349  return left.value() < right.value();
350 }
351 
352 
353 inline bool operator<(const FrameworkID& left, const FrameworkID& right)
354 {
355  return left.value() < right.value();
356 }
357 
358 
359 inline bool operator<(const OfferID& left, const OfferID& right)
360 {
361  return left.value() < right.value();
362 }
363 
364 
365 inline bool operator<(const SlaveID& left, const SlaveID& right)
366 {
367  return left.value() < right.value();
368 }
369 
370 
371 inline bool operator<(const TaskID& left, const TaskID& right)
372 {
373  return left.value() < right.value();
374 }
375 
376 
377 std::ostream& operator<<(
378  std::ostream& stream,
379  const CapabilityInfo& capabilityInfo);
380 
381 
382 std::ostream& operator<<(
383  std::ostream& stream,
384  const DeviceWhitelist& deviceWhitelist);
385 
386 
387 std::ostream& operator<<(
388  std::ostream& stream,
389  const CheckStatusInfo& checkStatusInfo);
390 
391 
392 std::ostream& operator<<(std::ostream& stream, const CommandInfo& commandInfo);
393 
394 
395 std::ostream& operator<<(std::ostream& stream, const ContainerID& containerId);
396 
397 
398 std::ostream& operator<<(
399  std::ostream& stream,
400  const ContainerInfo& containerInfo);
401 
402 
403 std::ostream& operator<<(std::ostream& stream, const DomainInfo& domainInfo);
404 
405 
406 std::ostream& operator<<(std::ostream& stream, const DrainConfig& drainConfig);
407 
408 
409 std::ostream& operator<<(std::ostream& stream, const DrainState& state);
410 
411 
412 std::ostream& operator<<(std::ostream& stream, const Environment& environment);
413 
414 
415 std::ostream& operator<<(std::ostream& stream, const ExecutorID& executorId);
416 
417 
418 std::ostream& operator<<(std::ostream& stream, const ExecutorInfo& executor);
419 
420 
421 std::ostream& operator<<(std::ostream& stream, const FrameworkID& frameworkId);
422 
423 
424 std::ostream& operator<<(std::ostream& stream, const MasterInfo& master);
425 
426 
427 std::ostream& operator<<(std::ostream& stream, const OfferID& offerId);
428 
429 
430 std::ostream& operator<<(std::ostream& stream, const OperationID& operationId);
431 
432 
433 std::ostream& operator<<(std::ostream& stream, const OperationState& state);
434 
435 
436 std::ostream& operator<<(std::ostream& stream, const Operation& operation);
437 
438 
439 std::ostream& operator<<(std::ostream& stream, const RateLimits& limits);
440 
441 
442 std::ostream& operator<<(
443  std::ostream& stream,
444  const ResourceProviderID& resourceProviderId);
445 
446 
447 std::ostream& operator<<(
448  std::ostream& stream,
449  const ResourceProviderInfo& resourceProviderInfo);
450 
451 
452 std::ostream& operator<<(std::ostream& stream, const RLimitInfo& rlimitInfo);
453 
454 
455 std::ostream& operator<<(std::ostream& stream, const SlaveID& slaveId);
456 
457 
458 std::ostream& operator<<(std::ostream& stream, const SlaveInfo& slave);
459 
460 
461 std::ostream& operator<<(std::ostream& stream, const TaskID& taskId);
462 
463 
464 std::ostream& operator<<(std::ostream& stream, const MachineID& machineId);
465 
466 
467 std::ostream& operator<<(std::ostream& stream, const TaskInfo& task);
468 
469 
470 std::ostream& operator<<(std::ostream& stream, const TaskState& state);
471 
472 
473 std::ostream& operator<<(
474  std::ostream& stream,
475  const UUID& uuid);
476 
477 
478 std::ostream& operator<<(std::ostream& stream, const CheckInfo::Type& type);
479 
480 
481 std::ostream& operator<<(
482  std::ostream& stream,
483  const CSIPluginContainerInfo::Service& service);
484 
485 
486 std::ostream& operator<<(
487  std::ostream& stream,
488  const FrameworkInfo::Capability& capability);
489 
490 
491 std::ostream& operator<<(std::ostream& stream, const Image::Type& imageType);
492 
493 
494 std::ostream& operator<<(std::ostream& stream, const Secret::Type& secretType);
495 
496 
497 std::ostream& operator<<(
498  std::ostream& stream,
499  const Offer::Operation::Type& operationType);
500 
501 
502 std::ostream& operator<<(
503  std::ostream& stream,
504  const Resource::DiskInfo::Source::Type& sourceType);
505 
506 
507 template <typename T>
508 inline std::ostream& operator<<(
509  std::ostream& stream,
510  const std::vector<T>& messages)
511 {
512  stream << "[ ";
513  for (auto it = messages.begin(); it != messages.end(); ++it) {
514  if (it != messages.begin()) {
515  stream << ", ";
516  }
517  stream << *it;
518  }
519  stream << " ]";
520  return stream;
521 }
522 
523 } // namespace mesos {
524 
525 
531 namespace google {
532 namespace protobuf {
533 
534 template <typename Key, typename Value>
535 inline bool operator==(
536  const Map<Key, Value>& left, const Map<Key, Value>& right)
537 {
538  if (left.size() != right.size()) {
539  return false;
540  }
541 
542  for (auto it = left.begin(); it != left.end(); ++it) {
543  auto found = right.find(it->first);
544  if (found == right.end() || found->second != it->second) {
545  return false;
546  }
547  }
548 
549  return true;
550 }
551 
552 
553 template <typename Key, typename Value>
554 inline bool operator!=(
555  const Map<Key, Value>& left, const Map<Key, Value>& right)
556 {
557  return !(left == right);
558 }
559 
560 
561 template <typename Key, typename Value>
562 inline std::ostream& operator<<(
563  std::ostream& stream, const Map<Key, Value>& map)
564 {
565  stream << "{ ";
566  for (auto it = map.cbegin(); it != map.end(); ++it) {
567  if (it != map.cbegin()) {
568  stream << ", ";
569  }
570  stream << it->first << ": " << it->second;
571  }
572  stream << " }";
573 
574  return stream;
575 }
576 
577 
578 template <typename T>
579 inline std::ostream& operator<<(
580  std::ostream& stream,
581  const RepeatedPtrField<T>& messages)
582 {
583  stream << "[ ";
584  for (auto it = messages.begin(); it != messages.end(); ++it) {
585  if (it != messages.begin()) {
586  stream << ", ";
587  }
588  stream << *it;
589  }
590  stream << " ]";
591  return stream;
592 }
593 
594 } // namespace protobuf {
595 } // namespace google {
596 
597 
598 namespace std {
599 
600 template <>
601 struct hash<mesos::CommandInfo::URI>
602 {
603  typedef size_t result_type;
604 
605  typedef mesos::CommandInfo::URI argument_type;
606 
607  result_type operator()(const argument_type& uri) const
608  {
609  size_t seed = 0;
610 
611  if (uri.extract()) {
612  seed += 11;
613  }
614 
615  if (uri.executable()) {
616  seed += 2003;
617  }
618 
619  boost::hash_combine(seed, uri.value());
620  boost::hash_combine(seed, uri.output_file());
621  return seed;
622  }
623 };
624 
625 
626 template <>
627 struct hash<mesos::ContainerID>
628 {
629  typedef size_t result_type;
630 
631  typedef mesos::ContainerID argument_type;
632 
633  result_type operator()(const argument_type& containerId) const
634  {
635  size_t seed = 0;
636  boost::hash_combine(seed, containerId.value());
637 
638  if (containerId.has_parent()) {
639  boost::hash_combine(
640  seed,
641  std::hash<mesos::ContainerID>()(containerId.parent()));
642  }
643 
644  return seed;
645  }
646 };
647 
648 
649 template <>
650 struct hash<mesos::ExecutorID>
651 {
652  typedef size_t result_type;
653 
654  typedef mesos::ExecutorID argument_type;
655 
656  result_type operator()(const argument_type& executorId) const
657  {
658  size_t seed = 0;
659  boost::hash_combine(seed, executorId.value());
660  return seed;
661  }
662 };
663 
664 
665 template <>
666 struct hash<mesos::FrameworkID>
667 {
668  typedef size_t result_type;
669 
670  typedef mesos::FrameworkID argument_type;
671 
672  result_type operator()(const argument_type& frameworkId) const
673  {
674  size_t seed = 0;
675  boost::hash_combine(seed, frameworkId.value());
676  return seed;
677  }
678 };
679 
680 
681 template <>
682 struct hash<mesos::Image::Type>
683 {
684  typedef size_t result_type;
685 
687 
688  result_type operator()(const argument_type& imageType) const
689  {
690  // Use the underlying type of the enum as hash value.
691  return static_cast<size_t>(imageType);
692  }
693 };
694 
695 
696 template <>
697 struct hash<mesos::MachineID>
698 {
699  typedef size_t result_type;
700 
701  typedef mesos::MachineID argument_type;
702 
703  result_type operator()(const argument_type& machineId) const
704  {
705  size_t seed = 0;
706  boost::hash_combine(seed, strings::lower(machineId.hostname()));
707  boost::hash_combine(seed, machineId.ip());
708  return seed;
709  }
710 };
711 
712 
713 template <>
714 struct hash<mesos::OfferID>
715 {
716  typedef size_t result_type;
717 
718  typedef mesos::OfferID argument_type;
719 
720  result_type operator()(const argument_type& offerId) const
721  {
722  size_t seed = 0;
723  boost::hash_combine(seed, offerId.value());
724  return seed;
725  }
726 };
727 
728 
729 template <>
730 struct hash<mesos::OperationID>
731 {
732  typedef size_t result_type;
733 
734  typedef mesos::OperationID argument_type;
735 
736  result_type operator()(const argument_type& operationId) const
737  {
738  size_t seed = 0;
739  boost::hash_combine(seed, operationId.value());
740  return seed;
741  }
742 };
743 
744 
745 template <>
746 struct hash<mesos::ResourceProviderID>
747 {
748  typedef size_t result_type;
749 
750  typedef mesos::ResourceProviderID argument_type;
751 
752  result_type operator()(const argument_type& resourceProviderId) const
753  {
754  size_t seed = 0;
755  boost::hash_combine(seed, resourceProviderId.value());
756  return seed;
757  }
758 };
759 
760 
761 template <>
762 struct hash<mesos::SlaveID>
763 {
764  typedef size_t result_type;
765 
766  typedef mesos::SlaveID argument_type;
767 
768  result_type operator()(const argument_type& slaveId) const
769  {
770  size_t seed = 0;
771  boost::hash_combine(seed, slaveId.value());
772  return seed;
773  }
774 };
775 
776 
777 template <>
778 struct hash<mesos::TaskID>
779 {
780  typedef size_t result_type;
781 
782  typedef mesos::TaskID argument_type;
783 
784  result_type operator()(const argument_type& taskId) const
785  {
786  size_t seed = 0;
787  boost::hash_combine(seed, taskId.value());
788  return seed;
789  }
790 };
791 
792 
793 template <>
794 struct hash<mesos::TaskState>
795 {
796  typedef size_t result_type;
797 
798  typedef mesos::TaskState argument_type;
799 
800  result_type operator()(const argument_type& taskState) const
801  {
802  // Use the underlying type of the enum as hash value.
803  return static_cast<size_t>(taskState);
804  }
805 };
806 
807 
808 template <>
809 struct hash<mesos::TaskStatus_Source>
810 {
811  typedef size_t result_type;
812 
813  typedef mesos::TaskStatus_Source argument_type;
814 
815  result_type operator()(const argument_type& source) const
816  {
817  // Use the underlying type of the enum as hash value.
818  return static_cast<size_t>(source);
819  }
820 };
821 
822 
823 template <>
824 struct hash<mesos::TaskStatus_Reason>
825 {
826  typedef size_t result_type;
827 
828  typedef mesos::TaskStatus_Reason argument_type;
829 
830  result_type operator()(const argument_type& reason) const
831  {
832  // Use the underlying type of the enum as hash value.
833  return static_cast<size_t>(reason);
834  }
835 };
836 
837 
838 template <>
839 struct hash<mesos::UUID>
840 {
841  typedef size_t result_type;
842 
843  typedef mesos::UUID argument_type;
844 
845  result_type operator()(const argument_type& uuid) const
846  {
847  size_t seed = 0;
848  boost::hash_combine(seed, uuid.value());
849  return seed;
850  }
851 };
852 
853 
854 template <>
855 struct hash<std::pair<mesos::FrameworkID, mesos::ExecutorID>>
856 {
857  typedef size_t result_type;
858 
859  typedef std::pair<
860  mesos::FrameworkID, mesos::ExecutorID> argument_type;
861 
862  result_type operator()(const argument_type& pair) const
863  {
864  size_t seed = 0;
865  boost::hash_combine(seed, std::hash<mesos::FrameworkID>()(pair.first));
866  boost::hash_combine(seed, std::hash<mesos::ExecutorID>()(pair.second));
867  return seed;
868  }
869 };
870 
871 
872 template <>
873 struct hash<std::pair<mesos::FrameworkID, mesos::OperationID>>
874 {
875  typedef size_t result_type;
876 
877  typedef std::pair<
878  mesos::FrameworkID, mesos::OperationID> argument_type;
879 
880  result_type operator()(const argument_type& pair) const
881  {
882  size_t seed = 0;
883  boost::hash_combine(seed, std::hash<mesos::FrameworkID>()(pair.first));
884  boost::hash_combine(seed, std::hash<mesos::OperationID>()(pair.second));
885  return seed;
886  }
887 };
888 
889 } // namespace std {
890 
891 #endif // __MESOS_TYPE_UTILS_H__
std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
size_t result_type
Definition: type_utils.hpp:841
Definition: type_utils.hpp:666
mesos::MachineID argument_type
Definition: type_utils.hpp:701
result_type operator()(const argument_type &executorId) const
Definition: type_utils.hpp:656
size_t result_type
Definition: type_utils.hpp:652
Definition: master.hpp:27
result_type operator()(const argument_type &containerId) const
Definition: type_utils.hpp:633
mesos::Image::Type argument_type
Definition: type_utils.hpp:686
result_type operator()(const argument_type &slaveId) const
Definition: type_utils.hpp:768
result_type operator()(const argument_type &uri) const
Definition: type_utils.hpp:607
size_t result_type
Definition: type_utils.hpp:780
result_type operator()(const argument_type &resourceProviderId) const
Definition: type_utils.hpp:752
result_type operator()(const argument_type &pair) const
Definition: type_utils.hpp:880
mesos::TaskStatus_Source argument_type
Definition: type_utils.hpp:813
bool operator==(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
Definition: type_utils.hpp:598
result_type operator()(const argument_type &offerId) const
Definition: type_utils.hpp:720
mesos::TaskState argument_type
Definition: type_utils.hpp:798
mesos::ContainerID argument_type
Definition: type_utils.hpp:631
Capability
Definition: capabilities.hpp:35
result_type operator()(const argument_type &reason) const
Definition: type_utils.hpp:830
Operation
Definition: cgroups.hpp:458
result_type operator()(const argument_type &machineId) const
Definition: type_utils.hpp:703
size_t result_type
Definition: type_utils.hpp:699
bool operator<(const ContainerID &left, const ContainerID &right)
Definition: type_utils.hpp:335
mesos::TaskID argument_type
Definition: type_utils.hpp:782
size_t result_type
Definition: type_utils.hpp:826
size_t result_type
Definition: type_utils.hpp:811
mesos::ResourceProviderID argument_type
Definition: type_utils.hpp:750
mesos::FrameworkID argument_type
Definition: type_utils.hpp:670
size_t result_type
Definition: type_utils.hpp:684
result_type operator()(const argument_type &source) const
Definition: type_utils.hpp:815
bool operator!=(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
Environment * environment
mesos::UUID argument_type
Definition: type_utils.hpp:843
result_type operator()(const argument_type &uuid) const
Definition: type_utils.hpp:845
Definition: agent.hpp:25
size_t result_type
Definition: type_utils.hpp:716
size_t result_type
Definition: type_utils.hpp:796
size_t result_type
Definition: type_utils.hpp:603
Definition: protobuf.hpp:61
size_t result_type
Definition: type_utils.hpp:732
result_type operator()(const argument_type &taskId) const
Definition: type_utils.hpp:784
std::pair< mesos::FrameworkID, mesos::ExecutorID > argument_type
Definition: type_utils.hpp:860
result_type operator()(const argument_type &frameworkId) const
Definition: type_utils.hpp:672
Iterable< V > map(F &&f, const Iterable< U, Us... > &input)
Definition: lambda.hpp:46
result_type operator()(const argument_type &pair) const
Definition: type_utils.hpp:862
Type
Definition: capabilities.hpp:79
CSIPluginContainerInfo::Service Service
Definition: service_manager.hpp:38
std::pair< mesos::FrameworkID, mesos::OperationID > argument_type
Definition: type_utils.hpp:878
mesos::CommandInfo::URI argument_type
Definition: type_utils.hpp:605
Try< uint32_t > type(const std::string &path)
Definition: type_utils.hpp:627
size_t result_type
Definition: type_utils.hpp:629
Definition: uri.hpp:21
Type utilities for the protobuf library that are not specific to particular protobuf classes...
Definition: type_utils.hpp:531
mesos::ExecutorID argument_type
Definition: type_utils.hpp:654
result_type operator()(const argument_type &imageType) const
Definition: type_utils.hpp:688
size_t result_type
Definition: type_utils.hpp:764
mesos::SlaveID argument_type
Definition: type_utils.hpp:766
mesos::TaskStatus_Reason argument_type
Definition: type_utils.hpp:828
std::string lower(const std::string &s)
Definition: strings.hpp:429
Definition: type_utils.hpp:730
mesos::OperationID argument_type
Definition: type_utils.hpp:734
mesos::OfferID argument_type
Definition: type_utils.hpp:718
size_t result_type
Definition: type_utils.hpp:748
result_type operator()(const argument_type &operationId) const
Definition: type_utils.hpp:736
Definition: type_utils.hpp:650
size_t result_type
Definition: type_utils.hpp:668
result_type operator()(const argument_type &taskState) const
Definition: type_utils.hpp:800