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

Method InitChannel

db/util_testing.go:820–823  ·  view source on GitHub ↗

InitChannel is a test-only function to initialize a channel in the channel cache.

(ctx context.Context, t *testing.T, chanName string)

Source from the content-addressed store, hash-verified

818
819// InitChannel is a test-only function to initialize a channel in the channel cache.
820func (db *DatabaseContext) InitChannel(ctx context.Context, t *testing.T, chanName string) error {
821 _, err := db.channelCache.getSingleChannelCache(ctx, channels.NewID(chanName, base.DefaultCollectionID))
822 return err
823}
824
825func CreateTestDocument(docID string, revID string, body Body, deleted bool, expiry uint32) (newDoc *Document) {
826 newDoc = &Document{

Callers 1

mainFunction · 0.95

Calls 2

NewIDFunction · 0.92
getSingleChannelCacheMethod · 0.65

Tested by

no test coverage detected