-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Delta Sync Pull support, and add new BlipTesterClient for emulating
a connecting CBL client replicating over blip. - Fix BLIP logging - Initial delta sync pull implementation - Move deltaSrc to blip message property - Bump manifest for fleece, improve bliptest client WaitForRev - Assert that the blip message sent was using deltas in EE and full-body in CE - Split fleecedelta invocations out into files with EE/CE build flags - Add notdefault to EE deps in manifest
- Loading branch information
Showing
9 changed files
with
476 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// +build !cb_sg_enterprise | ||
|
||
package base | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
// ErrDeltasNotSupported is returned when these functions are called in CE | ||
var ErrDeltasNotSupported = fmt.Errorf("Deltas not supported in CE") | ||
|
||
// Diff is only implemented in EE, the CE stub always returns an error. | ||
func Diff(old, new map[string]interface{}) (delta []byte, err error) { | ||
return nil, ErrDeltasNotSupported | ||
} | ||
|
||
// Patch is only implemented in EE, the CE stub always returns an error. | ||
func Patch(old *map[string]interface{}, delta []byte) (err error) { | ||
return ErrDeltasNotSupported | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// +build cb_sg_enterprise | ||
|
||
package base | ||
|
||
import fleecedelta "github.com/couchbaselabs/go-fleecedelta" | ||
|
||
// The reason for these wrappers is to keep go-fleecedelta out of the compiled CE builds by providing no-op versions in deltas_ce.go | ||
|
||
// Diff will return the fleece delta between old and new. | ||
func Diff(old, new map[string]interface{}) (delta []byte, err error) { | ||
return fleecedelta.DiffJSON(old, new) | ||
} | ||
|
||
// Patch will patch old with the given delta. | ||
func Patch(old *map[string]interface{}, delta []byte) (err error) { | ||
return fleecedelta.PatchJSON(old, delta) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.