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

Method initialize

3rdparty/libprocess/examples/example.cpp:69–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68protected:
69 void initialize() override
70 {
71 // route("/vars", None(), &MyProcess::vars);
72 route("/vars", None(), [=](const Request& request) {
73 string body = "... vars here ...";
74 return OK(body);
75 });
76
77 // install("stop", &MyProcess::stop);
78 install("stop", [=](const UPID& from, const string& body) {
79 terminate(self());
80 });
81 }
82
83private:
84 Promise<int> promise;

Callers

nothing calls this directly

Calls 4

NoneClass · 0.85
OKClass · 0.85
installFunction · 0.50
terminateFunction · 0.50

Tested by

no test coverage detected