lib/components/proxy.js
function(app, sinfo) {
  let records = [],
    appBase = app.getBase(),
    record;
  // sys remote service path record
  if (app.isFrontend(sinfo)) {
    record = pathUtil.getSysRemotePath('frontend');
  } else {
    record = pathUtil.getSysRemotePath('backend');
  }
  if (record) {
    records.push(pathUtil.remotePathRecord('sys', sinfo.serverType, record));
  }

  // user remote service path record
  record = pathUtil.getUserRemotePath(appBase, sinfo.serverType);
  if (record) {
    records.push(pathUtil.remotePathRecord('user', sinfo.serverType, record));
  }

  return records;
}
function(app, sinfo) {
  let records = [],
    appBase = app.getBase(),
    record;
  // sys remote service path record
  if (app.isFrontend(sinfo)) {
    record = pathUtil.getSysRemotePath('frontend');
  } else {
    record = pathUtil.getSysRemotePath('backend');
  }
  if (record) {
    records.push(pathUtil.remotePathRecord('sys', sinfo.serverType, record));
  }

  // user remote service path record
  record = pathUtil.getUserRemotePath(appBase, sinfo.serverType);
  if (record) {
    records.push(pathUtil.remotePathRecord('user', sinfo.serverType, record));
  }

  return records;
}
function ( app , sinfo ) { let records = [ ] , appBase = app . getBase ( ) , record ; // sys remote service path record if ( app . isFrontend ( sinfo ) ) { record = pathUtil . getSysRemotePath ( 'frontend' ) ; } else { record = pathUtil . getSysRemotePath ( 'backend' ) ; } if ( record ) { records . push ( pathUtil . remotePathRecord ( 'sys' , sinfo . serverType , record ) ) ; } // user remote service path record record = pathUtil . getUserRemotePath ( appBase , sinfo . serverType ) ; if ( record ) { records . push ( pathUtil . remotePathRecord ( 'user' , sinfo . serverType , record ) ) ; } return records ; }
Get proxy path for rpc client.
Iterate all the remote service path and create remote path record.

@param {Object} app current application context
@param {Object} sinfo server info, format: {id, serverType, host, port}
@return {Array}     remote path record array
Get proxy path for rpc client . Iterate all the remote service path and create remote path record .