SubscribeNotifySwitch
Description
Receives the link failover/switchback subscription request from the client. The server allocates a message queue to each job and monitors whether the message queue contains messages to be transmitted. If yes, the server transmits the messages to the client through the gRPC stream.
Prototype
rpc SubscribeNotifySwitch(ClientInfo) returns (stream SwitchRankList) {}
Input Parameters
Parameter |
Type (Defined by Protobuf) |
Description |
|---|---|---|
ClientInfo |
message ClientInfo{ string jobId = 1; string role = 2; } |
ClientInfo.jobId: job ID ClientInfo.role: client role |
Data to Be Sent
Parameter |
Type (Defined by Protobuf) |
Description |
|---|---|---|
SwitchRankList |
message SwitchRankList{ repeated string rankID = 1; repeated bool op = 2; string jobId = 3; } |
SwitchRankList.rankID: list of device IDs on a node, corresponding to DeviceList.op. SwitchRankList.op: list of link failover operations to be performed on the device, specified by the device ID of the corresponding node. true indicates the standby link and false indicates the active link. SwitchRankList.jobId: job ID |
Return Value
Parameter |
Type (Defined by Protobuf) |
Description |
|---|---|---|
stream |
gRPC stream |
|