本文整理汇总了C++中SlaveInfo::attributes方法的典型用法代码示例。如果您正苦于以下问题:C++ SlaveInfo::attributes方法的具体用法?C++ SlaveInfo::attributes怎么用?C++ SlaveInfo::attributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SlaveInfo
的用法示例。
在下文中一共展示了SlaveInfo::attributes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Resources
bool operator==(const SlaveInfo& left, const SlaveInfo& right)
{
return left.hostname() == right.hostname() &&
Resources(left.resources()) == Resources(right.resources()) &&
Attributes(left.attributes()) == Attributes(right.attributes()) &&
left.id() == right.id() &&
left.checkpoint() == right.checkpoint() &&
left.port() == right.port();
}
示例2: Resources
inline bool operator == (const SlaveInfo& left, const SlaveInfo& right)
{
return left.hostname() == right.hostname() &&
left.webui_hostname() == right.webui_hostname() &&
Resources(left.resources()) == Resources(right.resources()) &&
internal::Attributes(left.attributes()) ==
internal::Attributes(right.attributes()) &&
left.has_webui_port() == right.has_webui_port() &&
(!left.has_webui_port() || (left.webui_port() == right.webui_port())) &&
left.has_id() == right.has_id() &&
(!left.has_id() || (left.id() == right.id())) &&
left.has_checkpoint() == right.has_checkpoint() &&
(!left.has_checkpoint() || (left.checkpoint() == right.checkpoint()));
}
示例3: slaveAttributesDecorator
virtual Result<Attributes> slaveAttributesDecorator(
const SlaveInfo& slaveInfo)
{
LOG(INFO) << "Executing 'slaveAttributesDecorator' hook";
Attributes attributes = slaveInfo.attributes();
attributes.add(Attributes::parse("rack", "rack1"));
return attributes;
}