ni.measurementlink.discovery.v1.discovery_service_pb2_grpc

Classes

DiscoveryServiceStub

The service used as a registry for other services. This service can be used to discover

DiscoveryServiceAsyncStub

The service used as a registry for other services. This service can be used to discover

DiscoveryServiceServicer

The service used as a registry for other services. This service can be used to discover

Functions

add_DiscoveryServiceServicer_to_server(servicer, server)

Package Contents

class ni.measurementlink.discovery.v1.discovery_service_pb2_grpc.DiscoveryServiceStub(channel)

The service used as a registry for other services. This service can be used to discover and activate other services present in the system.

Parameters:

channel (Union[grpc.Channel, grpc.aio.Channel])

RegisterService: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceResponse]

Registers a service instance with the discovery service.

Status codes for errors:

  • INVALID_ARGUMENT:

    • ServiceDescriptor.display_name is empty

    • ServiceDescriptor.provided_interfaces is empty

    • ServiceDescriptor.service_class is empty

    • ServiceLocation.location is empty

    • Both ServiceLocation.insecure_port and ServiceLocation.ssl_authenticated_port are empty

    • Either ServiceLocation.insecure_port or ServiceLocation.ssl_authenticated_port contain an invalid port number

UnregisterService: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceResponse]

Unregisters a service instance with the discovery service.

EnumerateServices: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesResponse]

Enumerate all services which implement a specific service interface. This is useful for plugin type systems where the possible services are not known ahead of time.

ResolveService: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.ServiceLocation]

Given a description of a service, returns information that can be used to establish communication with that service. If necessary, the service will be started by the discovery service if it has not already been started. Activation of the service is accomplished through use of a .serviceconfig file which includes information describing the service. Services that register a .serviceconfig file must call RegisterService when their service is started or this call will never complete successfully when the discovery service attempts to start it.

Status codes for errors:

  • INVALID_ARGUMENT: provided_interfaces is empty

  • NOT_FOUND: No service matching the resolve request was found

  • FAILED_PRECONDITION: More than one service matching the resolve request was found

ResolveServiceWithInformation: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationResponse]

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.

EnumerateComputeNodes: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesResponse]

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 get the service location for a service running on that compute node.

EnumerateActiveServices: grpc.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesResponse]

Enumerate all service instances that are currently active (running). This RPC is intended for diagnostic and informational purposes, such as displaying the status of registered services to a user. It should not be used to obtain a service location for the purpose of communicating with that service; use ResolveService or ResolveServiceWithInformation for that purpose.

Unlike EnumerateServices, this RPC returns individual active service instances rather than collapsing multiple registered versions into a single ServiceDescriptor entry, allowing callers to see each running instance independently when multiple versions are active side by side.

class ni.measurementlink.discovery.v1.discovery_service_pb2_grpc.DiscoveryServiceAsyncStub

The service used as a registry for other services. This service can be used to discover and activate other services present in the system.

RegisterService: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceResponse]

Registers a service instance with the discovery service.

Status codes for errors:

  • INVALID_ARGUMENT:

    • ServiceDescriptor.display_name is empty

    • ServiceDescriptor.provided_interfaces is empty

    • ServiceDescriptor.service_class is empty

    • ServiceLocation.location is empty

    • Both ServiceLocation.insecure_port and ServiceLocation.ssl_authenticated_port are empty

    • Either ServiceLocation.insecure_port or ServiceLocation.ssl_authenticated_port contain an invalid port number

UnregisterService: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceResponse]

Unregisters a service instance with the discovery service.

EnumerateServices: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesResponse]

Enumerate all services which implement a specific service interface. This is useful for plugin type systems where the possible services are not known ahead of time.

ResolveService: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.ServiceLocation]

Given a description of a service, returns information that can be used to establish communication with that service. If necessary, the service will be started by the discovery service if it has not already been started. Activation of the service is accomplished through use of a .serviceconfig file which includes information describing the service. Services that register a .serviceconfig file must call RegisterService when their service is started or this call will never complete successfully when the discovery service attempts to start it.

Status codes for errors:

  • INVALID_ARGUMENT: provided_interfaces is empty

  • NOT_FOUND: No service matching the resolve request was found

  • FAILED_PRECONDITION: More than one service matching the resolve request was found

ResolveServiceWithInformation: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationResponse]

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.

EnumerateComputeNodes: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesResponse]

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 get the service location for a service running on that compute node.

EnumerateActiveServices: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesRequest, ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesResponse]

Enumerate all service instances that are currently active (running). This RPC is intended for diagnostic and informational purposes, such as displaying the status of registered services to a user. It should not be used to obtain a service location for the purpose of communicating with that service; use ResolveService or ResolveServiceWithInformation for that purpose.

Unlike EnumerateServices, this RPC returns individual active service instances rather than collapsing multiple registered versions into a single ServiceDescriptor entry, allowing callers to see each running instance independently when multiple versions are active side by side.

class ni.measurementlink.discovery.v1.discovery_service_pb2_grpc.DiscoveryServiceServicer

The service used as a registry for other services. This service can be used to discover and activate other services present in the system.

abstractmethod RegisterService(request, context)

Registers a service instance with the discovery service.

Status codes for errors:

  • INVALID_ARGUMENT:

    • ServiceDescriptor.display_name is empty

    • ServiceDescriptor.provided_interfaces is empty

    • ServiceDescriptor.service_class is empty

    • ServiceLocation.location is empty

    • Both ServiceLocation.insecure_port and ServiceLocation.ssl_authenticated_port are empty

    • Either ServiceLocation.insecure_port or ServiceLocation.ssl_authenticated_port contain an invalid port number

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.RegisterServiceResponse]]

abstractmethod UnregisterService(request, context)

Unregisters a service instance with the discovery service.

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.UnregisterServiceResponse]]

abstractmethod EnumerateServices(request, context)

Enumerate all services which implement a specific service interface. This is useful for plugin type systems where the possible services are not known ahead of time.

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateServicesResponse]]

abstractmethod ResolveService(request, context)

Given a description of a service, returns information that can be used to establish communication with that service. If necessary, the service will be started by the discovery service if it has not already been started. Activation of the service is accomplished through use of a .serviceconfig file which includes information describing the service. Services that register a .serviceconfig file must call RegisterService when their service is started or this call will never complete successfully when the discovery service attempts to start it.

Status codes for errors:

  • INVALID_ARGUMENT: provided_interfaces is empty

  • NOT_FOUND: No service matching the resolve request was found

  • FAILED_PRECONDITION: More than one service matching the resolve request was found

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.ServiceLocation, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.ServiceLocation]]

abstractmethod ResolveServiceWithInformation(request, context)

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.

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.ResolveServiceWithInformationResponse]]

abstractmethod EnumerateComputeNodes(request, context)

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 get the service location for a service running on that compute node.

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateComputeNodesResponse]]

abstractmethod EnumerateActiveServices(request, context)

Enumerate all service instances that are currently active (running). This RPC is intended for diagnostic and informational purposes, such as displaying the status of registered services to a user. It should not be used to obtain a service location for the purpose of communicating with that service; use ResolveService or ResolveServiceWithInformation for that purpose.

Unlike EnumerateServices, this RPC returns individual active service instances rather than collapsing multiple registered versions into a single ServiceDescriptor entry, allowing callers to see each running instance independently when multiple versions are active side by side.

Parameters:
Return type:

Union[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesResponse, collections.abc.Awaitable[ni.measurementlink.discovery.v1.discovery_service_pb2.EnumerateActiveServicesResponse]]

ni.measurementlink.discovery.v1.discovery_service_pb2_grpc.add_DiscoveryServiceServicer_to_server(servicer, server)
Parameters:
Return type:

None