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

Function ServerIsWalrus

base/constants.go:256–262  ·  view source on GitHub ↗

ServerIsWalrus returns true when the given server looks like a Walrus URI Equivalent to the old regexp: `^(walrus:|file:|/|\.)`

(server string)

Source from the content-addressed store, hash-verified

254// ServerIsWalrus returns true when the given server looks like a Walrus URI
255// Equivalent to the old regexp: `^(walrus:|file:|/|\.)`
256func ServerIsWalrus(server string) bool {
257 return strings.HasPrefix(server, "walrus:") ||
258 strings.HasPrefix(server, "rosmar:") ||
259 strings.HasPrefix(server, "file:") ||
260 strings.HasPrefix(server, "/") ||
261 strings.HasPrefix(server, ".")
262}

Callers 10

NewServerContextFunction · 0.92
getClusterUUIDMethod · 0.92
ValidateMethod · 0.92
SetupServerContextFunction · 0.92
BucketMethod · 0.92
UnitTestUrlIsWalrusFunction · 0.85
IsWalrusBucketMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected