| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| // Source: types.vdl |
| |
| package vsync |
| |
| import ( |
| // VDL system imports |
| "v.io/v23/vdl" |
| |
| // VDL user imports |
| "v.io/x/ref/services/syncbase/server/interfaces" |
| ) |
| |
| // syncData represents the persistent state of the sync module. |
| type syncData struct { |
| Id uint64 |
| } |
| |
| func (syncData) __VDLReflect(struct { |
| Name string `vdl:"v.io/x/ref/services/syncbase/vsync.syncData"` |
| }) { |
| } |
| |
| // localGenInfo represents the persistent state corresponding to local generations. |
| type localGenInfo struct { |
| Gen uint64 // local generation number incremented on every local update. |
| CheckptGen uint64 // local generation number advertised to remote peers (used by the responder). |
| } |
| |
| func (localGenInfo) __VDLReflect(struct { |
| Name string `vdl:"v.io/x/ref/services/syncbase/vsync.localGenInfo"` |
| }) { |
| } |
| |
| // dbSyncState represents the persistent sync state of a Database. |
| type dbSyncState struct { |
| Data localGenInfo |
| Sgs map[interfaces.GroupId]localGenInfo |
| GenVec interfaces.GenVector // generation vector capturing the locally-known generations of remote peers for data in Database. |
| SgGenVec interfaces.GenVector // generation vector capturing the locally-known generations of remote peers for SyncGroups in Database. |
| } |
| |
| func (dbSyncState) __VDLReflect(struct { |
| Name string `vdl:"v.io/x/ref/services/syncbase/vsync.dbSyncState"` |
| }) { |
| } |
| |
| // localLogRec represents the persistent local state of a log record. Metadata |
| // is synced across peers, while pos is local-only. |
| type localLogRec struct { |
| Metadata interfaces.LogRecMetadata |
| Pos uint64 // position in the Database log. |
| } |
| |
| func (localLogRec) __VDLReflect(struct { |
| Name string `vdl:"v.io/x/ref/services/syncbase/vsync.localLogRec"` |
| }) { |
| } |
| |
| func init() { |
| vdl.Register((*syncData)(nil)) |
| vdl.Register((*localGenInfo)(nil)) |
| vdl.Register((*dbSyncState)(nil)) |
| vdl.Register((*localLogRec)(nil)) |
| } |
| |
| const logPrefix = "log" // log state. |
| |
| const logDataPrefix = "data" // data log state. |
| |
| const dbssPrefix = "dbss" // database sync state. |
| |
| const dagPrefix = "dag" // dag state. |
| |
| const sgPrefix = "sg" // syncgroup state. |