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

Method send

src/executor/v0_v1executor.cpp:206–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 void send(ExecutorDriver* driver, const Call& call)
207 {
208 CHECK_NOTNULL(driver);
209
210 switch (call.type()) {
211 case Call::SUBSCRIBE: {
212 subscribeCall = true;
213
214 // The driver subscribes implicitly with the agent upon initialization.
215 // For compatibility with the v1 interface, send the already enqueued
216 // subscribed event upon receiving the subscribe request.
217 _received();
218
219 break;
220 }
221
222 case Call::UPDATE: {
223 driver->sendStatusUpdate(devolve(call.update().status()));
224 break;
225 }
226
227 case Call::MESSAGE: {
228 driver->sendFrameworkMessage(call.message().data());
229 break;
230 }
231
232 case Call::HEARTBEAT: {
233 // NOTE: Heartbeat calls were added to HTTP executors only.
234 // There is no equivalent method for PID-based executors.
235 break;
236 }
237
238 case Call::UNKNOWN: {
239 EXIT(EXIT_FAILURE) << "Received an unexpected " << call.type()
240 << " call";
241 break;
242 }
243 }
244 }
245
246protected:
247 void received(const Event& event)

Callers

nothing calls this directly

Calls 8

typeMethod · 0.80
dataMethod · 0.80
sendStatusUpdateMethod · 0.65
sendFrameworkMessageMethod · 0.65
devolveFunction · 0.50
statusMethod · 0.45
updateMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected