// Copyright (c) 2022 Boston Dynamics, Inc.  All rights reserved.
//
// Downloading, reproducing, distributing or otherwise using the SDK Software
// is subject to the terms and conditions of the Boston Dynamics Software
// Development Kit License (20191101-BDSDK-SL).

syntax = "proto3";

package bosdyn.api;

option java_outer_classname = "DirectoryRegistrationServiceProto";

import "bosdyn/api/directory_registration.proto";

// DirectoryRegistrationService is a private class that lets services be
// discovered by clients by adding them to a discovery database.  Services
// can live on robot, payload, or other accessible cloud-based locations.
// Each service is responsible for registering itself with this service.
service DirectoryRegistrationService {
    // Called by a producer to register as a provider with the application.  Returns the
    // record for that provider.  Requires unique name and correctly filled out service
    // record in request.
    rpc RegisterService(RegisterServiceRequest) returns (RegisterServiceResponse) {}

    // Called by a producer to remove its registration from the DirectoryManager.
    rpc UnregisterService(UnregisterServiceRequest) returns (UnregisterServiceResponse) {}

    // Update the ServiceEntry for a producer on the server.
    rpc UpdateService(UpdateServiceRequest) returns (UpdateServiceResponse) {}
}
