-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split proto file in services + messages. Rename package agent_api -> edgeless_api.
- Loading branch information
1 parent
55948a1
commit 57191d0
Showing
4 changed files
with
67 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
#[cfg(feature = "grpc_impl")] | ||
{ | ||
tonic_build::compile_protos("proto/agent_api.proto")?; | ||
tonic_build::compile_protos("proto/services.proto")?; | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "messages.proto"; | ||
|
||
package edgeless_api; | ||
|
||
// API to manage the lifecycle of function instances (s07). | ||
service FunctionInstance { | ||
// Start a new function instance. | ||
// Input: request containing the description of the function to create. | ||
// Output: the function instance identifier assigned | ||
rpc Start (SpawnFunctionRequest) returns (InstanceId); | ||
|
||
// Stop a running function instance. | ||
// Input: the identifier of the function instance to tear down. | ||
// Output: none. | ||
rpc Stop (InstanceId) returns (google.protobuf.Empty ); | ||
|
||
// Update a running function instance by changing the mapping between the | ||
// callback declarations and function instances. | ||
// Input: the update mapping. | ||
// Output: none. | ||
rpc UpdateLinks (UpdateFunctionLinksRequest) returns (google.protobuf.Empty); | ||
} | ||
|
||
// API to manage the lifecycle of workflow instances (s04). | ||
service WorkflowInstance { | ||
// Start a new workflow. | ||
// Input: request containing the description of the workflow to create. | ||
// Output: the status of workflow instance newly created. | ||
rpc Start (SpawnWorkflowRequest) returns (WorkflowInstanceStatus); | ||
|
||
// Stop an active workflow. | ||
// Input: the identifier of the workflow to tear down. | ||
// Output: none. | ||
|
||
rpc Stop (WorkflowId) returns (google.protobuf.Empty); | ||
// List the active workflows or shows the status of a given active workflow. | ||
// Input: the identifier of the active workflow or a special value indicating all workflows. | ||
// Output: the list of status of the active workflow instances. | ||
rpc List (WorkflowId) returns (WorkflowInstanceList); | ||
} | ||
|
||
// API to handle events (s01). | ||
service FunctionInvocation { | ||
// Handle an event. | ||
// Input: event to be handled. | ||
// Output: none. | ||
rpc Handle (Event) returns (google.protobuf.Empty); | ||
} | ||
|
||
// API to handle the lifecycle of resources (s06). | ||
service ResourceConfiguration { | ||
// Create a new resource. | ||
// Input: specification of the resource to be created. | ||
// Output: the identifier of the newly created resource. | ||
rpc Start (ResourceInstanceSpecification) returns (InstanceId); | ||
|
||
// Terminate an existing resource. | ||
// Input: the identifier of the resource to be terminated. | ||
// Output: none. | ||
rpc Stop (InstanceId) returns (google.protobuf.Empty); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters