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

Function parseOperation

src/linux/cgroups.cpp:1878–1895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1876
1877
1878static Try<Operation> parseOperation(const string& s)
1879{
1880 if (s == "Total") {
1881 return Operation::TOTAL;
1882 } else if (s == "Read") {
1883 return Operation::READ;
1884 } else if (s == "Write") {
1885 return Operation::WRITE;
1886 } else if (s == "Sync") {
1887 return Operation::SYNC;
1888 } else if (s == "Async") {
1889 return Operation::ASYNC;
1890 } else if (s == "Discard") {
1891 return Operation::DISCARD;
1892 }
1893
1894 return Error("Invalid Operation value: '" + s + "'");
1895}
1896
1897
1898Try<Value> Value::parse(const string& s)

Callers 1

parseMethod · 0.85

Calls 1

ErrorFunction · 0.50

Tested by

no test coverage detected