MCPcopy Create free account
hub / github.com/blues/note / hubNoteboxUpdateChangeTracker

Function hubNoteboxUpdateChangeTracker

lib/hubreq.go:940–959  ·  view source on GitHub ↗

Update the tracker

(ctx context.Context, session *HubSession, req notehubMessage, rsp *notehubMessage, event EventFunc)

Source from the content-addressed store, hash-verified

938
939// Update the tracker
940func hubNoteboxUpdateChangeTracker(ctx context.Context, session *HubSession, req notehubMessage, rsp *notehubMessage, event EventFunc) (err error) {
941 // Open the box
942 box, _, _, err2 := openHubNoteboxForDevice(ctx, session, req.DeviceUID, req.DeviceSN, req.ProductUID, req.DeviceEndpointID, event)
943 if err2 != nil {
944 err = err2
945 return
946 }
947
948 // Merge the tracked changes
949 err = box.UpdateChangeTracker(req.DeviceEndpointID, req.Since, req.Until)
950 if err != nil {
951 box.Close(ctx)
952 return err
953 }
954
955 // Done
956 box.Close(ctx)
957
958 return nil
959}
960
961// Notefile Changes
962func hubNotefileChanges(ctx context.Context, session *HubSession, req notehubMessage, rsp *notehubMessage, event EventFunc) (err error) {

Callers 1

processRequestFunction · 0.85

Calls 3

openHubNoteboxForDeviceFunction · 0.85
UpdateChangeTrackerMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected