MCPcopy Index your code
hub / github.com/couchbase/sync_gateway

github.com/couchbase/sync_gateway @4.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 4.0.4 ↗ · + Follow
8,109 symbols 70,350 edges 511 files 4,124 documented · 51%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Sync Gateway

Sync Gateway Documentation GoDoc Go Report Card Code Coverage License

Sync Gateway is a horizontally scalable web server that securely manages the access control and synchronization of data between Couchbase Lite and Couchbase Server.

Couchbase Capella DBaaS

Couchbase's cloud database platform is the easiest and fastest way to begin with Couchbase and eliminate ongoing database management efforts. Try for free at Couchbase Capella.

Self-Managed and On-Prem

Download Sync Gateway and other Couchbase packages for Linux, Windows and macOS at Couchbase Downloads.

Build from source

Pre-requisites

To build Sync Gateway from source, you must have the following installed:

  • Go 1.21 or later (Installing Go)
  • Building the Enterprise Edition requires access to private code, and cannot be built by third-parties.

Build Instructions

$ go build

Resources

License

Business Source License 1.1

Extension points exported contracts — how you extend this code

BackgroundManagerProcessI (Interface)
BackgroundManagerProcessI is an interface satisfied by any of the background processes Examples of this: ReSync, Compact [6 …
db/background_mgr.go
Redactor (Interface)
Redactor provides an interface for log redaction. [4 implementers]
base/redactor.go
Manager (Interface)
Manager represents a bucket to bucket replication. [4 implementers]
xdcr/replication.go
RevisionCache (Interface)
RevisionCache is an interface that can be used to fetch a DocumentRevision for a Doc ID and Rev ID pair. [4 implementers]
db/revision_cache_interface.go
ChannelComputer (Interface)
Interface for deriving the set of channels and roles a User/Role has access to. The instantiator of an Authenticator mus [3 …
auth/auth.go
HeartbeatListener (Interface)
A HeartbeatListener defines the set of nodes it wants to monitor, and a callback when one of those nodes stops sending h [3 …
base/heartbeat.go
N1QLStore (Interface)
N1QLStore defines the set of operations Sync Gateway uses to manage and interact with N1QL [3 implementers]
base/collection_n1ql_common.go
CountableResponseWriter (Interface)
CountableResponseWriter is an interface that any custom http.ResponseWriter used by Sync Gateway handlers need to implem [3 …
rest/counted_response_writer.go

Core symbols most depended-on inside this repo

RequireStatus
called by 2203
rest/utilities_testing.go
SendAdminRequest
called by 1826
rest/utilities_testing.go
Close
called by 1069
topologytest/peer_test.go
Value
called by 1036
base/util.go
Run
called by 835
db/functions.go
Len
called by 790
auth/password_hash.go
JSONUnmarshal
called by 745
base/util_ce.go
Ptr
called by 741
base/util.go

Shape

Function 3,824
Method 3,390
Struct 644
TypeAlias 140
Interface 49
FuncType 39
Class 21
Route 2

Languages

Go98%
Python2%
TypeScript1%

Modules by API surface

rest/utilities_testing.go189 symbols
base/util.go160 symbols
rest/utilities_testing_blip_client.go139 symbols
base/stats.go117 symbols
db/database_test.go114 symbols
db/database.go108 symbols
db/crud.go102 symbols
rest/config.go101 symbols
rest/adminapitest/admin_api_test.go97 symbols
rest/replicatortest/replicator_test.go96 symbols
db/document.go94 symbols
rest/handler.go92 symbols

For agents

$ claude mcp add sync_gateway \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact