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

Method send

src/scheduler/scheduler.cpp:225–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 }
224
225 void send(const Call& call)
226 {
227 Option<Error> error = validation::scheduler::call::validate(devolve(call));
228
229 if (error.isSome()) {
230 drop(call, error->message);
231 return;
232 }
233
234 // TODO(vinod): Add support for sending MESSAGE calls directly
235 // to the slave, instead of relaying it through the master, as
236 // the scheduler driver does.
237
238 process::http::Request request;
239 request.method = "POST";
240 request.url = master.get();
241 request.body = serialize(contentType, call);
242 request.keepAlive = true;
243 request.headers = {{"Accept", stringify(contentType)},
244 {"Content-Type", stringify(contentType)}};
245
246 VLOG(1) << "Adding authentication headers to " << call.type() << " call to "
247 << master.get();
248
249 // TODO(tillt): Add support for multi-step authentication protocols.
250 authenticatee->authenticate(request, credential)
251 .onAny(defer(self(), &Self::_send, call, lambda::_1));
252 }
253
254 Future<APIResult> call(const Call& callMessage)
255 {

Callers

nothing calls this directly

Calls 9

deferFunction · 0.85
typeMethod · 0.80
validateFunction · 0.50
devolveFunction · 0.50
serializeFunction · 0.50
stringifyFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
authenticateMethod · 0.45

Tested by

no test coverage detected