Пример #1
0
v1::AgentID evolve(const SlaveID& slaveId)
{
  // NOTE: Not using 'evolve<SlaveID, v1::AgentID>(slaveId)' since
  // this will be a common 'evolve' call and we wanted to speed up
  // performance.

  v1::AgentID id;
  id.set_value(slaveId.value());
  return id;
}
Пример #2
0
inline std::size_t hash_value(const SlaveID& slaveId)
{
  size_t seed = 0;
  boost::hash_combine(seed, slaveId.value());
  return seed;
}
Пример #3
0
inline bool operator == (const SlaveID& left, const std::string& right)
{
  return left.value() == right;
}
Пример #4
0
inline bool operator < (const SlaveID& left, const SlaveID& right)
{
  return left.value() < right.value();
}
Пример #5
0
 static std::string name(const SlaveID& slaveId, const std::string& id)
 {
   return DOCKER_NAME_PREFIX + slaveId.value() + DOCKER_NAME_SEPERATOR +
     stringify(id);
 }