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; }
inline std::size_t hash_value(const SlaveID& slaveId) { size_t seed = 0; boost::hash_combine(seed, slaveId.value()); return seed; }
inline bool operator == (const SlaveID& left, const std::string& right) { return left.value() == right; }
inline bool operator < (const SlaveID& left, const SlaveID& right) { return left.value() < right.value(); }
static std::string name(const SlaveID& slaveId, const std::string& id) { return DOCKER_NAME_PREFIX + slaveId.value() + DOCKER_NAME_SEPERATOR + stringify(id); }