17 #ifndef __MESOS_CSI_V0_HPP__ 18 #define __MESOS_CSI_V0_HPP__ 21 #include <type_traits> 24 #include <csi/v0/csi.pb.h> 27 #include <csi/v0/csi.grpc.pb.h> 29 #include <google/protobuf/message.h> 31 #include <google/protobuf/util/json_util.h> 32 #include <google/protobuf/util/message_differencer.h> 57 typename std::enable_if<std::is_convertible<
58 Message*, google::protobuf::Message*>::value,
int>
::type = 0>
59 bool operator==(
const Message& left,
const Message& right)
63 return google::protobuf::util::MessageDifferencer::Equivalent(left, right);
69 typename std::enable_if<std::is_convertible<
70 Message*, google::protobuf::Message*>::value,
int>::type = 0>
71 bool operator!=(
const Message& left,
const Message& right)
73 return !(left == right);
87 typename std::enable_if<std::is_convertible<
88 Message*, google::protobuf::Message*>::value,
int>::type = 0>
89 std::ostream&
operator<<(std::ostream& stream,
const Message& message)
93 google::protobuf::util::Status
status =
94 google::protobuf::util::MessageToJsonString(message, &output);
97 <<
"Could not convert messages to string: " << status.error_message();
99 return stream << output;
105 #endif // __MESOS_CSI_V0_HPP__ std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
Result< ProcessStatus > status(pid_t pid)
Definition: proc.hpp:166
bool operator==(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
bool operator!=(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
constexpr char API_VERSION[]
Definition: v0.hpp:42
Type
Definition: capabilities.hpp:82
Try< uint32_t > type(const std::string &path)