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

Function NewPullReplicator

db/active_replicator_pull.go:25–35  ·  view source on GitHub ↗

NewPullReplicator creates an ISGR pull replicator.

(ctx context.Context, config *ActiveReplicatorConfig)

Source from the content-addressed store, hash-verified

23
24// NewPullReplicator creates an ISGR pull replicator.
25func NewPullReplicator(ctx context.Context, config *ActiveReplicatorConfig) (*ActivePullReplicator, error) {
26 replicator, err := newActiveReplicatorCommon(ctx, config, ActiveReplicatorTypePull)
27 if err != nil {
28 return nil, err
29 }
30 apr := ActivePullReplicator{
31 activeReplicatorCommon: replicator,
32 }
33 replicator.registerFunctions(apr._getStatus, apr._connect, apr.registerCheckpointerCallbacks)
34 return &apr, nil
35}
36
37func (apr *ActivePullReplicator) _connect() error {
38 var err error

Callers 1

NewActiveReplicatorFunction · 0.85

Calls 2

registerFunctionsMethod · 0.80

Tested by

no test coverage detected