MCPcopy Create free account
hub / github.com/apache/mesos / convertStringMapToLabels

Function convertStringMapToLabels

src/common/protobuf_utils.cpp:670–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668
669
670Labels convertStringMapToLabels(const Map<string, string>& map)
671{
672 Labels labels;
673
674 foreach (const auto& entry, map) {
675 Label* label = labels.mutable_labels()->Add();
676 label->set_key(entry.first);
677 label->set_value(entry.second);
678 }
679
680 return labels;
681}
682
683
684Try<Map<string, string>> convertLabelsToStringMap(const Labels& labels)

Callers 3

foreachFunction · 0.85
applyCreateDiskMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68