Skip to content

Commit

Permalink
Added new ResolveServiceWithInformation API to discovery service (#51)
Browse files Browse the repository at this point in the history
* Feat: Add new ResolveServiceWithInformation API to discovery service

* Fix: Updated request and response messages

* Fix: Provided clear descriptive comments.

* Fix: Name change

* Fix: review comments

* Fix: Spacing
  • Loading branch information
MounikaBattu17 authored Jun 12, 2024
1 parent 638b30d commit 3e3f416
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions ni/measurementlink/discovery/v1/discovery_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ service DiscoveryService {
// - FAILED_PRECONDITION: More than one service matching the resolve request was found
rpc ResolveService(ResolveServiceRequest) returns (ServiceLocation);

// Similar to ResolveService, returns information for the service in addition to the location of the service.
// This is useful if you want to avoid the overhead of having to call EnumerateServices to get this information as part of
// resolution of the service. See ResolveService for additional documentation related to resolving the service.
rpc ResolveServiceWithInformation(ResolveServiceWithInformationRequest) returns (ResolveServiceWithInformationResponse);

// Enumerate all compute nodes that have registered themselves in the current session.
// These compute nodes are targets available for execution of services.
// A compute node can be used as an argument to the ResolveService method to
Expand Down Expand Up @@ -160,6 +165,31 @@ message ResolveServiceRequest {
string deployment_target = 3;
}

message ResolveServiceWithInformationRequest {
// Required. This corresponds to the gRPC Full Name of the service and should match the information
// that was supplied in the RegisterServiceRequest message.
string provided_interface = 1;

// Optional. The service "class" that should be matched. If the value of this field is not specified and there
// is more than one matching service registered, an error is returned.
string service_class = 2;

// Optional. Indicates the deployment target from which the service should be resolved.
// The value of this field can be obtained from the results of the EnumerateComputeNodes method.
// If the value of this field is not specified, the service will be resolved from the
// local deployment target. If the service cannot be resolved from the specified deployment
// target, an error is returned.
string deployment_target = 3;
}

message ResolveServiceWithInformationResponse {
// The canonical location information of the service.
ServiceLocation service_location = 1;

// The description of the service.
ServiceDescriptor service_descriptor = 2;
}

// Represents a location capable resolving and running a service.
message ComputeNodeDescriptor {
// The resolvable name of the compute node.
Expand Down

0 comments on commit 3e3f416

Please sign in to comment.