add progress step
This commit is contained in:
parent
d84f44c149
commit
18697d841b
|
@ -67,6 +67,11 @@ void dnodeSendRedirectMsg(struct SRpcMsg *rpcMsg, bool forShell);
|
|||
*/
|
||||
void dnodeGetEp(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
||||
|
||||
/**
|
||||
* Report the startup progress.
|
||||
*/
|
||||
void dnodeReportStartup(char *name, char *desc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -46,6 +46,11 @@ typedef struct {
|
|||
*/
|
||||
void (*GetDnodeEp)(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
||||
|
||||
/**
|
||||
* Report the startup progress.
|
||||
*/
|
||||
void (*ReportStartup)(char *name, char *desc);
|
||||
|
||||
} SVnodeFp;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -37,7 +37,7 @@ EDnStat dnodeGetRunStat() { return tsDnode.runStatus; }
|
|||
|
||||
void dnodeSetRunStat(EDnStat stat) { tsDnode.runStatus = stat; }
|
||||
|
||||
static void dnodeReportStartup(char *name, char *desc) {
|
||||
void dnodeReportStartup(char *name, char *desc) {
|
||||
SStartupStep *startup = &tsDnode.startup;
|
||||
tstrncpy(startup->name, name, strlen(startup->name));
|
||||
tstrncpy(startup->desc, desc, strlen(startup->desc));
|
||||
|
@ -58,6 +58,7 @@ static int32_t dnodeInitVnode() {
|
|||
para.fp.GetDnodeEp = dnodeGetEp;
|
||||
para.fp.SendMsgToDnode = dnodeSendMsgToDnode;
|
||||
para.fp.SendMsgToMnode = dnodeSendMsgToMnode;
|
||||
para.fp.ReportStartup = dnodeReportStartup;
|
||||
|
||||
return vnodeInit(para);
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ typedef struct {
|
|||
void vnodeSendMsgToDnode(struct SRpcEpSet *epSet, struct SRpcMsg *rpcMsg);
|
||||
void vnodeSendMsgToMnode(struct SRpcMsg *rpcMsg);
|
||||
void vnodeGetDnodeEp(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
||||
void vnodeReportStartup(char *name, char *desc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ void vnodeSendMsgToDnode(struct SRpcEpSet *epSet, struct SRpcMsg *rpcMsg) {
|
|||
|
||||
void vnodeSendMsgToMnode(struct SRpcMsg *rpcMsg) { return (*tsVint.fp.SendMsgToMnode)(rpcMsg); }
|
||||
|
||||
void vnodeReportStartup(char *name, char *desc) { (*tsVint.fp.ReportStartup)(name, desc); }
|
||||
|
||||
void vnodeProcessMsg(SRpcMsg *pMsg) {
|
||||
if (tsVint.msgFp[pMsg->msgType]) {
|
||||
(*tsVint.msgFp[pMsg->msgType])(pMsg);
|
||||
|
|
Loading…
Reference in New Issue