Register (for Internal Use Only)

Description

Registers a role.

Prototype

rpc Register(RegisterReq) returns (Ack)

Input Parameters

Table 1 Parameter description

Parameter

Type (Defined by Protobuf)

Description

RegisterReq

message RegisterReq {

string uuid = 1;

Position pos = 2;

}

message Position {

string role = 1;

string serverRank = 2;

string processRank = 3;

}

uuid: registration message UUID

pos: registration message source

role: registered role, for example, Proxy, Worker, Agent, and Mgr

serverRank: rank of the server where the role is located

processRank: rank of the process where the role is located. This parameter is required for Worker. For Proxy, Agent, and Mgr, set this parameter to -1.

Return Value

Table 2 Return value description

Return Value

Type (Defined by Protobuf)

Description

Ack

message Ack {

string uuid = 1;

uint32 code = 2;

Position src = 3;

}

uuid: consistent with the registration message UUID

code: return code

  • 0: registration succeeded.
  • Other values: registration failed.

src: role location