_connect opens up a connection, and starts replicating.
()
| 43 | |
| 44 | // _connect opens up a connection, and starts replicating. |
| 45 | func (apr *ActivePushReplicator) _connect() error { |
| 46 | var err error |
| 47 | apr.blipSender, apr.blipSyncContext, err = connect(apr.activeReplicatorCommon, "-push") |
| 48 | if err != nil { |
| 49 | return err |
| 50 | } |
| 51 | |
| 52 | // TODO: If this were made a config option, and the default conflict resolver not enforced on |
| 53 | // the pull side, it would be feasible to run sgr-2 in 'manual conflict resolution' mode |
| 54 | apr.blipSyncContext.sendRevNoConflicts = true |
| 55 | |
| 56 | if apr.config.CollectionsEnabled { |
| 57 | if err := apr._startPushWithCollections(); err != nil { |
| 58 | return err |
| 59 | } |
| 60 | } else { |
| 61 | // for backwards compatibility use no collection-specific handling/messages |
| 62 | if err := apr._startPushNonCollection(); err != nil { |
| 63 | return err |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | apr.setState(ReplicationStateRunning) |
| 68 | return nil |
| 69 | } |
| 70 | |
| 71 | // Complete gracefully shuts down a replication, waiting for all in-flight revisions to be processed |
| 72 | // before stopping the replication |
nothing calls this directly
no test coverage detected