Loading TOC...

flexrep.configurationTargets

flexrep.configurationTargets(
   cfg as element(flexrep.configuration)
) as Sequence

Summary

This function returns the replication targets for a configuration.

Parameters
cfg The replication configuration.

Example

const flexrep = require('/MarkLogic/flexrep');

  // Obtain the domain ID from the database used by the Master to enable CPF.
  const domain = xdmp.eval(
    'const dom = require("/MarkLogic/cpf/domains");' +
      'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));',
       null,
         {
          'database' : xdmp.database('Triggers')
         });

  const cfg = flexrep.configurationGet(domain, true);

  flexrep.configurationTargets(cfg);

  // Returns the replication targets configured for the Default Master domain.
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.