Protocol Documentation

Table of Contents

registration_service.proto

Top

Public API for the registration services.

This IDL defines the APIs for the service registration services.

RegisterReply

The response message containing success or failure of the service registration request. A return value of true indicates success and false indicates failure. If the value is false, the error attibute indicates the reason for failure.

FieldTypeLabelDescription
result bool optional

Returned result (true or false)

error string optional

Error string containing the reason for failure

RegisterRequest

The request message containing the service registration info

FieldTypeLabelDescription
json_input string optional

JSON string from the file emitted using protoc-thrift compiler

file_input string optional

Absolute file path on the router containing json input

target string optional

Target ip-address or unix domain socket for this service.

For example:

IPv6 address format is [::]:50051

IPv4 address format is 0.0.0.0:50051 and

unix domain socket format is unix:/tmp/test_socket

register_id string optional

Registration ID that is used as the filename to store the APIs registered in /opt/lib.proto/<register-id>.json. JSD reads the contents of this file upon restart. When the daemon re-registers the APIs, it uses the same register ID. This allows JSD to delete the old file and store the new contents in that file.

skip_authentication bool optional

Boolean variable to indicate if JSD should skip LoginCheck() call for RPCs executed for this package from clients if they are connected using a secure channel

Register

The service Registration definition.

Method NameRequest TypeResponse TypeDescription
RegisterService RegisterRequest RegisterReply

The RPC used to make service registration requests

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str