Added internal wrapper messages for local resource provider Event/Call.

For local resource providers, the agent will serve as a proxy between
local resource provider and the master. It'll forward resource
provider Events and Calls.

Review: https://reviews.apache.org/r/59047


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/18220a50
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/18220a50
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/18220a50

Branch: refs/heads/master
Commit: 18220a50d3033a4debffd7cc61f1514ede7e2c2b
Parents: d32f85e
Author: Jie Yu <[email protected]>
Authored: Mon May 8 14:16:30 2017 +0200
Committer: Jie Yu <[email protected]>
Committed: Mon May 8 16:06:06 2017 +0200

----------------------------------------------------------------------
 src/messages/messages.proto | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/18220a50/src/messages/messages.proto
----------------------------------------------------------------------
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index eae9ce5..2c08626 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -17,6 +17,7 @@
 syntax = "proto2";
 
 import "mesos/mesos.proto";
+import "mesos/resource_provider/resource_provider.proto";
 
 package mesos.internal;
 
@@ -601,6 +602,36 @@ message UpdateSlaveMessage {
 
 
 /**
+ * A wrapper message that is sent for a local resource provider Call
+ * by the agent to the master. The agent serves as a proxy between the
+ * local resource provider and the master.
+ */
+message ResourceProviderCallMessage {
+  required resource_provider.Call call = 1;
+
+  // This field will be set for the initial 'Subscribe' Call where the
+  // resource provider ID hasn't been assigned yet. This 'uuid' will
+  // be echoed back in the corresponding 'Subscribed' Event, allowing
+  // the agent to tell which resource provider the Event is for.
+  optional bytes uuid = 2;
+}
+
+
+/**
+ * A wrapper message that is sent for a local resource provider Event
+ * by the master to the agent. The agent serves as a proxy between the
+ * local resource provider and the master.
+ */
+message ResourceProviderEventMessage {
+  required ResourceProviderID resource_provider_id = 1;
+  required resource_provider.Event event = 2;
+
+  // See the comments in 'ResourceProviderCallMessage'.
+  optional bytes uuid = 3;
+}
+
+
+/**
  * Subscribes the executor with the agent to receive events.
  *
  * See executor::Call::Subscribe.

Reply via email to