Skip to content
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

Update DiscoveryService with support for TestHub #31

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ni/measurementlink/discovery/v1/discovery_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ service DiscoveryService {
// - NOT_FOUND: No service matching the resolve request was found
// - FAILED_PRECONDITION: More than one service matching the resolve request was found
rpc ResolveService(ResolveServiceRequest) returns (ServiceLocation);

// Enumerate all compute nodes that have registered themselves with TestHub.
nick-beer marked this conversation as resolved.
Show resolved Hide resolved
// These compute nodes are targets available for execution of services.
// A compute node can be used as an argument to the ResolveService method to
// get the service location for a service running on that compute node.
rpc EnumerateComputeNodes(EnumerateComputeNodesRequest) returns (EnumerateComputeNodesResponse);
}

// Description of a registered service. This information can be used to display information to the user
Expand Down Expand Up @@ -140,4 +146,29 @@ message ResolveServiceRequest {
// 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;
}

// Represents a location capable resolving and running a service.
message ComputeNodeInfo {
nick-beer marked this conversation as resolved.
Show resolved Hide resolved
// The resolvable name of the compute node.
string node_name = 1;
nick-beer marked this conversation as resolved.
Show resolved Hide resolved
// indicates whether the compute node is considered the local node.
bool is_local = 2;
}

// Message sent to enumerate the compute nodes that have registered themselves with TestHub.
message EnumerateComputeNodesRequest {
}

// Message returned from the EnumerateComputeNodes method.
message EnumerateComputeNodesResponse {
// The list of compute nodes that have registered themselves with TestHub.
repeated ComputeNodeInfo compute_nodes = 1;
}
Loading