-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [dotnet] open control channel for grpc save/load #5489
base: main
Are you sure you want to change the base?
Changes from all commits
d8ccd0a
b2e5fff
379f1a5
19edd1d
f4919c7
b795d04
3620a37
f4189fa
3d35c96
947fd95
21c1ba4
8252ac4
7273213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,31 @@ | |
} | ||
} | ||
|
||
/// <summary> | ||
/// Open channel for the Control Channel (defined in the proto file). | ||
/// </summary> | ||
/// <param name="requestStream">The request stream.</param> | ||
/// <param name="responseStream">The response stream.</param> | ||
/// <param name="context">The server call context.</param> | ||
/// <returns>A task that represents the asynchronous operation.</returns> | ||
/// <remarks>Control channel is used for control messages between the agent worker and the cluster.</remarks> | ||
/// public virtual global::System.Threading.Tasks.Task OpenControlChannel(grpc::IAsyncStreamReader<global::Microsoft.AutoGen.Protobuf.ControlMessage> requestStream, grpc::IServerStreamWriter<global::Microsoft.AutoGen.Protobuf.ControlMessage> responseStream, grpc::ServerCallContext context) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may want to remove the commented out part |
||
public override async Task OpenControlChannel(IAsyncStreamReader<ControlMessage> requestStream, IServerStreamWriter<ControlMessage> responseStream, ServerCallContext context) | ||
{ | ||
try | ||
{ | ||
await Gateway.ConnectToWorkerProcess(requestStream, responseStream, context).ConfigureAwait(true); | ||
} | ||
catch | ||
Check warning on line 53 in dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Services/Grpc/GrpcGatewayService.cs
|
||
{ | ||
if (context.CancellationToken.IsCancellationRequested) | ||
{ | ||
return; | ||
Check warning on line 57 in dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Services/Grpc/GrpcGatewayService.cs
|
||
} | ||
throw; | ||
Check warning on line 59 in dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Services/Grpc/GrpcGatewayService.cs
|
||
} | ||
} | ||
Check warning on line 61 in dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Services/Grpc/GrpcGatewayService.cs
|
||
|
||
/// <summary> | ||
/// Adds a subscription. | ||
/// </summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may want to remove this