MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / NewPushReplicator

Function NewPushReplicator

db/active_replicator_push.go:30–40  ·  view source on GitHub ↗

NewPushReplicator creates an ISGR push replicator.

(ctx context.Context, config *ActiveReplicatorConfig)

Source from the content-addressed store, hash-verified

28
29// NewPushReplicator creates an ISGR push replicator.
30func NewPushReplicator(ctx context.Context, config *ActiveReplicatorConfig) (*ActivePushReplicator, error) {
31 replicator, err := newActiveReplicatorCommon(ctx, config, ActiveReplicatorTypePush)
32 if err != nil {
33 return nil, err
34 }
35 apr := ActivePushReplicator{
36 activeReplicatorCommon: replicator,
37 }
38 replicator.registerFunctions(apr._getStatus, apr._connect, apr.registerCheckpointerCallbacks)
39 return &apr, nil
40}
41
42var PreHydrogenTargetAllowConflictsError = errors.New("cannot run replication to target with allow_conflicts=false. Change to allow_conflicts=true or upgrade to 2.8")
43

Callers 1

NewActiveReplicatorFunction · 0.85

Calls 2

registerFunctionsMethod · 0.80

Tested by

no test coverage detected