blob: 8c7a6aec72cb9aaeaa102094bdd122cb1d2035aa [file] [log] [blame]
Adam Sadovskyb85e3532015-04-08 20:38:27 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// This file was auto-generated by the vanadium vdl tool.
6// Source: vsync.vdl
7
8package vsync
9
10import (
11 // VDL system imports
12 "io"
13 "v.io/v23"
14 "v.io/v23/context"
15 "v.io/v23/rpc"
16 "v.io/v23/vdl"
17
18 // VDL user imports
19 "v.io/v23/security/access"
20)
21
22// temporary types
23type ObjId string
24
25func (ObjId) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070026 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.ObjId"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070027}) {
28}
29
30type Version uint64
31
32func (Version) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070033 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.Version"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070034}) {
35}
36
37type GroupId uint64
38
39func (GroupId) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070040 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.GroupId"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070041}) {
42}
43
44// DeviceId is the globally unique Id of a device.
45type DeviceId string
46
47func (DeviceId) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070048 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.DeviceId"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070049}) {
50}
51
52// GenId is the unique Id per generation per device.
53type GenId uint64
54
55func (GenId) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070056 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.GenId"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070057}) {
58}
59
60// SeqNum is the log sequence number.
61type SeqNum uint64
62
63func (SeqNum) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070064 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.SeqNum"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070065}) {
66}
67
68// GenVector is the generation vector.
69type GenVector map[DeviceId]GenId
70
71func (GenVector) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070072 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.GenVector"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070073}) {
74}
75
76// TxId is the unique Id per transaction.
77type TxId uint64
78
79func (TxId) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070080 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.TxId"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070081}) {
82}
83
84// GroupIdSet is the list of SyncGroup Ids.
85type GroupIdSet []GroupId
86
87func (GroupIdSet) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -070088 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.GroupIdSet"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -070089}) {
90}
91
92// LogRec represents a single log record that is exchanged between two
93// peers.
94//
95// It contains log related metadata: DevId is the id of the device
96// that created the log record, SyncRootId is the id of a SyncRoot this log
97// record was created under, GNum is the Id of the generation that the
98// log record is part of, SeqNum is the log sequence number of the log
99// record in the generation GNum, and RecType is the type of log
100// record.
101//
102// It also contains information relevant to the updates to an object
103// in the store: ObjId is the id of the object that was
104// updated. CurVers is the current version number of the
105// object. Parents can contain 0, 1 or 2 parent versions that the
106// current version is derived from, and Value is the actual value of
107// the object mutation.
108type LogRec struct {
109 // Log related information.
110 DevId DeviceId
111 SyncRootId ObjId
112 GenNum GenId
113 SeqNum SeqNum
114 RecType byte
115 // Object related information.
116 ObjId ObjId
117 CurVers Version
118 Parents []Version
119 Value LogValue
120}
121
122func (LogRec) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700123 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.LogRec"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700124}) {
125}
126
127// LogValue represents an object mutation within a transaction.
128type LogValue struct {
129 // Mutation is the store mutation representing the change in the object.
130 //Mutation raw.Mutation
131 // SyncTime is the timestamp of the mutation when it arrives at the Sync server.
132 SyncTime int64
133 // Delete indicates whether the mutation resulted in the object being
134 // deleted from the store.
135 Delete bool
136 // TxId is the unique Id of the transaction this mutation belongs to.
137 TxId TxId
138 // TxCount is the number of mutations in the transaction TxId.
139 TxCount uint32
140}
141
142func (LogValue) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700143 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.LogValue"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700144}) {
145}
146
147// DeviceStats contains high-level information on a device participating in
148// peer-to-peer synchronization.
149type DeviceStats struct {
150 DevId DeviceId // Device Id.
151 LastSync int64 // Timestamp of last sync from the device.
152 GenVectors map[ObjId]GenVector // Generation vectors per SyncRoot.
153 IsSelf bool // True if the responder is on this device.
154}
155
156func (DeviceStats) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700157 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.DeviceStats"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700158}) {
159}
160
161// SyncGroupStats contains high-level information on a SyncGroup.
162type SyncGroupStats struct {
163 Name string // Global name of the SyncGroup.
164 Id GroupId // Global Id of the SyncGroup.
165 Path string // Local store path for the root of the SyncGroup.
166 RootObjId ObjId // Id of the store object at the root path.
167 NumJoiners uint32 // Number of members currently in the SyncGroup.
168}
169
170func (SyncGroupStats) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700171 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.SyncGroupStats"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700172}) {
173}
174
175// SyncGroupMember contains information on a SyncGroup member.
176type SyncGroupMember struct {
177 Name string // Name of SyncGroup member.
178 Id GroupId // Global Id of the SyncGroup.
179 Metadata JoinerMetaData // Extra member metadata.
180}
181
182func (SyncGroupMember) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700183 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.SyncGroupMember"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700184}) {
185}
186
187// A SyncGroupInfo is the conceptual state of a SyncGroup object.
188type SyncGroupInfo struct {
189 Id GroupId // Globally unique SyncGroup Id.
190 ServerName string // Global Vanadium name of SyncGroupServer.
191 GroupName string // Relative name of group; global name is ServerName/GroupName.
192 Config SyncGroupConfig // Configuration parameters of this SyncGroup.
193 ETag string // Version Id for concurrency control.
194 // A map from joiner names to the associated metaData for devices that
195 // have called Join() or Create() and not subsequently called Leave()
196 // or had Eject() called on them. The map returned by the calls below
197 // may contain only a subset of joiners if the number is large.
198 Joiners map[string]JoinerMetaData
199 // Blessings for joiners of this SyncGroup will be self-signed by the
200 // SyncGroupServer, and will have names matching
201 // JoinerBlessingPrefix/Name/...
202 JoinerBlessingPrefix string
203}
204
205func (SyncGroupInfo) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700206 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.SyncGroupInfo"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700207}) {
208}
209
210// A SyncGroupConfig contains some fields of SyncGroupInfo that
211// are passed at create time, but which can be changed later.
212type SyncGroupConfig struct {
213 Desc string // Human readable description.
214 Options map[string]*vdl.Value // Options for future evolution.
215 Permissions access.Permissions // The object's Permissions.
216 // Mount tables used to advertise for synchronization.
217 // Typically, we will have only one entry. However, an array allows
218 // mount tables to be changed over time.
219 MountTables []string
220 BlessingsDurationNanos int64 // Duration of blessings, in nanoseconds. 0 => use server default.
221}
222
223func (SyncGroupConfig) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700224 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.SyncGroupConfig"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700225}) {
226}
227
228// A JoinerMetaData contains the non-name information stored per joiner.
229type JoinerMetaData struct {
230 // SyncPriority is a hint to bias the choice of syncing partners.
231 // Members of the SyncGroup should choose to synchronize more often
232 // with partners with lower values.
233 SyncPriority int32
234}
235
236func (JoinerMetaData) __VDLReflect(struct {
Adam Sadovskybe0f8352015-05-11 16:04:15 -0700237 Name string `vdl:"v.io/syncbase/x/ref/services/syncbase/sync.JoinerMetaData"`
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700238}) {
239}
240
241func init() {
242 vdl.Register((*ObjId)(nil))
243 vdl.Register((*Version)(nil))
244 vdl.Register((*GroupId)(nil))
245 vdl.Register((*DeviceId)(nil))
246 vdl.Register((*GenId)(nil))
247 vdl.Register((*SeqNum)(nil))
248 vdl.Register((*GenVector)(nil))
249 vdl.Register((*TxId)(nil))
250 vdl.Register((*GroupIdSet)(nil))
251 vdl.Register((*LogRec)(nil))
252 vdl.Register((*LogValue)(nil))
253 vdl.Register((*DeviceStats)(nil))
254 vdl.Register((*SyncGroupStats)(nil))
255 vdl.Register((*SyncGroupMember)(nil))
256 vdl.Register((*SyncGroupInfo)(nil))
257 vdl.Register((*SyncGroupConfig)(nil))
258 vdl.Register((*JoinerMetaData)(nil))
259}
260
261// NodeRec type log record adds a new node in the dag.
262const NodeRec = byte(0)
263
264// LinkRec type log record adds a new link in the dag.
265const LinkRec = byte(1)
266
267// Sync interface has Object name "global/vsync/<devid>/sync".
268const SyncSuffix = "sync"
269
270// temporary nil values
271const NoObjId = ObjId("")
272
273const NoVersion = Version(0)
274
275const NoGroupId = GroupId(0)
276
277// SyncClientMethods is the client interface
278// containing Sync methods.
279//
280// Sync allows a device to GetDeltas from another device.
281type SyncClientMethods interface {
282 // GetDeltas returns a device's current generation vector and all
283 // the missing log records when compared to the incoming generation vector.
284 GetDeltas(ctx *context.T, in map[ObjId]GenVector, sgs map[ObjId]GroupIdSet, clientId DeviceId, opts ...rpc.CallOpt) (SyncGetDeltasClientCall, error)
285 // GetObjectHistory returns the mutation history of a store object.
286 GetObjectHistory(ctx *context.T, oid ObjId, opts ...rpc.CallOpt) (SyncGetObjectHistoryClientCall, error)
287 // GetDeviceStats returns information on devices participating in
288 // peer-to-peer synchronization.
289 GetDeviceStats(*context.T, ...rpc.CallOpt) (SyncGetDeviceStatsClientCall, error)
290 // GetSyncGroupMembers returns information on SyncGroup members.
291 // If SyncGroup names are specified, only members of these SyncGroups
292 // are returned. Otherwise, if the slice of names is nil or empty,
293 // members of all SyncGroups are returned.
294 GetSyncGroupMembers(ctx *context.T, sgNames []string, opts ...rpc.CallOpt) (SyncGetSyncGroupMembersClientCall, error)
295 // GetSyncGroupStats returns high-level information on all SyncGroups.
296 GetSyncGroupStats(*context.T, ...rpc.CallOpt) (SyncGetSyncGroupStatsClientCall, error)
297 // Dump writes to the Sync log internal information used for debugging.
298 Dump(*context.T, ...rpc.CallOpt) error
299}
300
301// SyncClientStub adds universal methods to SyncClientMethods.
302type SyncClientStub interface {
303 SyncClientMethods
304 rpc.UniversalServiceMethods
305}
306
307// SyncClient returns a client stub for Sync.
308func SyncClient(name string) SyncClientStub {
309 return implSyncClientStub{name}
310}
311
312type implSyncClientStub struct {
313 name string
314}
315
316func (c implSyncClientStub) GetDeltas(ctx *context.T, i0 map[ObjId]GenVector, i1 map[ObjId]GroupIdSet, i2 DeviceId, opts ...rpc.CallOpt) (ocall SyncGetDeltasClientCall, err error) {
317 var call rpc.ClientCall
318 if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "GetDeltas", []interface{}{i0, i1, i2}, opts...); err != nil {
319 return
320 }
321 ocall = &implSyncGetDeltasClientCall{ClientCall: call}
322 return
323}
324
325func (c implSyncClientStub) GetObjectHistory(ctx *context.T, i0 ObjId, opts ...rpc.CallOpt) (ocall SyncGetObjectHistoryClientCall, err error) {
326 var call rpc.ClientCall
327 if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "GetObjectHistory", []interface{}{i0}, opts...); err != nil {
328 return
329 }
330 ocall = &implSyncGetObjectHistoryClientCall{ClientCall: call}
331 return
332}
333
334func (c implSyncClientStub) GetDeviceStats(ctx *context.T, opts ...rpc.CallOpt) (ocall SyncGetDeviceStatsClientCall, err error) {
335 var call rpc.ClientCall
336 if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "GetDeviceStats", nil, opts...); err != nil {
337 return
338 }
339 ocall = &implSyncGetDeviceStatsClientCall{ClientCall: call}
340 return
341}
342
343func (c implSyncClientStub) GetSyncGroupMembers(ctx *context.T, i0 []string, opts ...rpc.CallOpt) (ocall SyncGetSyncGroupMembersClientCall, err error) {
344 var call rpc.ClientCall
345 if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "GetSyncGroupMembers", []interface{}{i0}, opts...); err != nil {
346 return
347 }
348 ocall = &implSyncGetSyncGroupMembersClientCall{ClientCall: call}
349 return
350}
351
352func (c implSyncClientStub) GetSyncGroupStats(ctx *context.T, opts ...rpc.CallOpt) (ocall SyncGetSyncGroupStatsClientCall, err error) {
353 var call rpc.ClientCall
354 if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "GetSyncGroupStats", nil, opts...); err != nil {
355 return
356 }
357 ocall = &implSyncGetSyncGroupStatsClientCall{ClientCall: call}
358 return
359}
360
361func (c implSyncClientStub) Dump(ctx *context.T, opts ...rpc.CallOpt) (err error) {
Adam Sadovsky3ab00362015-04-10 22:06:06 -0700362 err = v23.GetClient(ctx).Call(ctx, c.name, "Dump", nil, nil, opts...)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700363 return
364}
365
366// SyncGetDeltasClientStream is the client stream for Sync.GetDeltas.
367type SyncGetDeltasClientStream interface {
368 // RecvStream returns the receiver side of the Sync.GetDeltas client stream.
369 RecvStream() interface {
370 // Advance stages an item so that it may be retrieved via Value. Returns
371 // true iff there is an item to retrieve. Advance must be called before
372 // Value is called. May block if an item is not available.
373 Advance() bool
374 // Value returns the item that was staged by Advance. May panic if Advance
375 // returned false or was not called. Never blocks.
376 Value() LogRec
377 // Err returns any error encountered by Advance. Never blocks.
378 Err() error
379 }
380}
381
382// SyncGetDeltasClientCall represents the call returned from Sync.GetDeltas.
383type SyncGetDeltasClientCall interface {
384 SyncGetDeltasClientStream
385 // Finish blocks until the server is done, and returns the positional return
386 // values for call.
387 //
388 // Finish returns immediately if the call has been canceled; depending on the
389 // timing the output could either be an error signaling cancelation, or the
390 // valid positional return values from the server.
391 //
392 // Calling Finish is mandatory for releasing stream resources, unless the call
393 // has been canceled or any of the other methods return an error. Finish should
394 // be called at most once.
395 Finish() (map[ObjId]GenVector, error)
396}
397
398type implSyncGetDeltasClientCall struct {
399 rpc.ClientCall
400 valRecv LogRec
401 errRecv error
402}
403
404func (c *implSyncGetDeltasClientCall) RecvStream() interface {
405 Advance() bool
406 Value() LogRec
407 Err() error
408} {
409 return implSyncGetDeltasClientCallRecv{c}
410}
411
412type implSyncGetDeltasClientCallRecv struct {
413 c *implSyncGetDeltasClientCall
414}
415
416func (c implSyncGetDeltasClientCallRecv) Advance() bool {
417 c.c.valRecv = LogRec{}
418 c.c.errRecv = c.c.Recv(&c.c.valRecv)
419 return c.c.errRecv == nil
420}
421func (c implSyncGetDeltasClientCallRecv) Value() LogRec {
422 return c.c.valRecv
423}
424func (c implSyncGetDeltasClientCallRecv) Err() error {
425 if c.c.errRecv == io.EOF {
426 return nil
427 }
428 return c.c.errRecv
429}
430func (c *implSyncGetDeltasClientCall) Finish() (o0 map[ObjId]GenVector, err error) {
431 err = c.ClientCall.Finish(&o0)
432 return
433}
434
435// SyncGetObjectHistoryClientStream is the client stream for Sync.GetObjectHistory.
436type SyncGetObjectHistoryClientStream interface {
437 // RecvStream returns the receiver side of the Sync.GetObjectHistory client stream.
438 RecvStream() interface {
439 // Advance stages an item so that it may be retrieved via Value. Returns
440 // true iff there is an item to retrieve. Advance must be called before
441 // Value is called. May block if an item is not available.
442 Advance() bool
443 // Value returns the item that was staged by Advance. May panic if Advance
444 // returned false or was not called. Never blocks.
445 Value() LogRec
446 // Err returns any error encountered by Advance. Never blocks.
447 Err() error
448 }
449}
450
451// SyncGetObjectHistoryClientCall represents the call returned from Sync.GetObjectHistory.
452type SyncGetObjectHistoryClientCall interface {
453 SyncGetObjectHistoryClientStream
454 // Finish blocks until the server is done, and returns the positional return
455 // values for call.
456 //
457 // Finish returns immediately if the call has been canceled; depending on the
458 // timing the output could either be an error signaling cancelation, or the
459 // valid positional return values from the server.
460 //
461 // Calling Finish is mandatory for releasing stream resources, unless the call
462 // has been canceled or any of the other methods return an error. Finish should
463 // be called at most once.
464 Finish() (Version, error)
465}
466
467type implSyncGetObjectHistoryClientCall struct {
468 rpc.ClientCall
469 valRecv LogRec
470 errRecv error
471}
472
473func (c *implSyncGetObjectHistoryClientCall) RecvStream() interface {
474 Advance() bool
475 Value() LogRec
476 Err() error
477} {
478 return implSyncGetObjectHistoryClientCallRecv{c}
479}
480
481type implSyncGetObjectHistoryClientCallRecv struct {
482 c *implSyncGetObjectHistoryClientCall
483}
484
485func (c implSyncGetObjectHistoryClientCallRecv) Advance() bool {
486 c.c.valRecv = LogRec{}
487 c.c.errRecv = c.c.Recv(&c.c.valRecv)
488 return c.c.errRecv == nil
489}
490func (c implSyncGetObjectHistoryClientCallRecv) Value() LogRec {
491 return c.c.valRecv
492}
493func (c implSyncGetObjectHistoryClientCallRecv) Err() error {
494 if c.c.errRecv == io.EOF {
495 return nil
496 }
497 return c.c.errRecv
498}
499func (c *implSyncGetObjectHistoryClientCall) Finish() (o0 Version, err error) {
500 err = c.ClientCall.Finish(&o0)
501 return
502}
503
504// SyncGetDeviceStatsClientStream is the client stream for Sync.GetDeviceStats.
505type SyncGetDeviceStatsClientStream interface {
506 // RecvStream returns the receiver side of the Sync.GetDeviceStats client stream.
507 RecvStream() interface {
508 // Advance stages an item so that it may be retrieved via Value. Returns
509 // true iff there is an item to retrieve. Advance must be called before
510 // Value is called. May block if an item is not available.
511 Advance() bool
512 // Value returns the item that was staged by Advance. May panic if Advance
513 // returned false or was not called. Never blocks.
514 Value() DeviceStats
515 // Err returns any error encountered by Advance. Never blocks.
516 Err() error
517 }
518}
519
520// SyncGetDeviceStatsClientCall represents the call returned from Sync.GetDeviceStats.
521type SyncGetDeviceStatsClientCall interface {
522 SyncGetDeviceStatsClientStream
523 // Finish blocks until the server is done, and returns the positional return
524 // values for call.
525 //
526 // Finish returns immediately if the call has been canceled; depending on the
527 // timing the output could either be an error signaling cancelation, or the
528 // valid positional return values from the server.
529 //
530 // Calling Finish is mandatory for releasing stream resources, unless the call
531 // has been canceled or any of the other methods return an error. Finish should
532 // be called at most once.
533 Finish() error
534}
535
536type implSyncGetDeviceStatsClientCall struct {
537 rpc.ClientCall
538 valRecv DeviceStats
539 errRecv error
540}
541
542func (c *implSyncGetDeviceStatsClientCall) RecvStream() interface {
543 Advance() bool
544 Value() DeviceStats
545 Err() error
546} {
547 return implSyncGetDeviceStatsClientCallRecv{c}
548}
549
550type implSyncGetDeviceStatsClientCallRecv struct {
551 c *implSyncGetDeviceStatsClientCall
552}
553
554func (c implSyncGetDeviceStatsClientCallRecv) Advance() bool {
555 c.c.valRecv = DeviceStats{}
556 c.c.errRecv = c.c.Recv(&c.c.valRecv)
557 return c.c.errRecv == nil
558}
559func (c implSyncGetDeviceStatsClientCallRecv) Value() DeviceStats {
560 return c.c.valRecv
561}
562func (c implSyncGetDeviceStatsClientCallRecv) Err() error {
563 if c.c.errRecv == io.EOF {
564 return nil
565 }
566 return c.c.errRecv
567}
568func (c *implSyncGetDeviceStatsClientCall) Finish() (err error) {
569 err = c.ClientCall.Finish()
570 return
571}
572
573// SyncGetSyncGroupMembersClientStream is the client stream for Sync.GetSyncGroupMembers.
574type SyncGetSyncGroupMembersClientStream interface {
575 // RecvStream returns the receiver side of the Sync.GetSyncGroupMembers client stream.
576 RecvStream() interface {
577 // Advance stages an item so that it may be retrieved via Value. Returns
578 // true iff there is an item to retrieve. Advance must be called before
579 // Value is called. May block if an item is not available.
580 Advance() bool
581 // Value returns the item that was staged by Advance. May panic if Advance
582 // returned false or was not called. Never blocks.
583 Value() SyncGroupMember
584 // Err returns any error encountered by Advance. Never blocks.
585 Err() error
586 }
587}
588
589// SyncGetSyncGroupMembersClientCall represents the call returned from Sync.GetSyncGroupMembers.
590type SyncGetSyncGroupMembersClientCall interface {
591 SyncGetSyncGroupMembersClientStream
592 // Finish blocks until the server is done, and returns the positional return
593 // values for call.
594 //
595 // Finish returns immediately if the call has been canceled; depending on the
596 // timing the output could either be an error signaling cancelation, or the
597 // valid positional return values from the server.
598 //
599 // Calling Finish is mandatory for releasing stream resources, unless the call
600 // has been canceled or any of the other methods return an error. Finish should
601 // be called at most once.
602 Finish() error
603}
604
605type implSyncGetSyncGroupMembersClientCall struct {
606 rpc.ClientCall
607 valRecv SyncGroupMember
608 errRecv error
609}
610
611func (c *implSyncGetSyncGroupMembersClientCall) RecvStream() interface {
612 Advance() bool
613 Value() SyncGroupMember
614 Err() error
615} {
616 return implSyncGetSyncGroupMembersClientCallRecv{c}
617}
618
619type implSyncGetSyncGroupMembersClientCallRecv struct {
620 c *implSyncGetSyncGroupMembersClientCall
621}
622
623func (c implSyncGetSyncGroupMembersClientCallRecv) Advance() bool {
624 c.c.valRecv = SyncGroupMember{}
625 c.c.errRecv = c.c.Recv(&c.c.valRecv)
626 return c.c.errRecv == nil
627}
628func (c implSyncGetSyncGroupMembersClientCallRecv) Value() SyncGroupMember {
629 return c.c.valRecv
630}
631func (c implSyncGetSyncGroupMembersClientCallRecv) Err() error {
632 if c.c.errRecv == io.EOF {
633 return nil
634 }
635 return c.c.errRecv
636}
637func (c *implSyncGetSyncGroupMembersClientCall) Finish() (err error) {
638 err = c.ClientCall.Finish()
639 return
640}
641
642// SyncGetSyncGroupStatsClientStream is the client stream for Sync.GetSyncGroupStats.
643type SyncGetSyncGroupStatsClientStream interface {
644 // RecvStream returns the receiver side of the Sync.GetSyncGroupStats client stream.
645 RecvStream() interface {
646 // Advance stages an item so that it may be retrieved via Value. Returns
647 // true iff there is an item to retrieve. Advance must be called before
648 // Value is called. May block if an item is not available.
649 Advance() bool
650 // Value returns the item that was staged by Advance. May panic if Advance
651 // returned false or was not called. Never blocks.
652 Value() SyncGroupStats
653 // Err returns any error encountered by Advance. Never blocks.
654 Err() error
655 }
656}
657
658// SyncGetSyncGroupStatsClientCall represents the call returned from Sync.GetSyncGroupStats.
659type SyncGetSyncGroupStatsClientCall interface {
660 SyncGetSyncGroupStatsClientStream
661 // Finish blocks until the server is done, and returns the positional return
662 // values for call.
663 //
664 // Finish returns immediately if the call has been canceled; depending on the
665 // timing the output could either be an error signaling cancelation, or the
666 // valid positional return values from the server.
667 //
668 // Calling Finish is mandatory for releasing stream resources, unless the call
669 // has been canceled or any of the other methods return an error. Finish should
670 // be called at most once.
671 Finish() error
672}
673
674type implSyncGetSyncGroupStatsClientCall struct {
675 rpc.ClientCall
676 valRecv SyncGroupStats
677 errRecv error
678}
679
680func (c *implSyncGetSyncGroupStatsClientCall) RecvStream() interface {
681 Advance() bool
682 Value() SyncGroupStats
683 Err() error
684} {
685 return implSyncGetSyncGroupStatsClientCallRecv{c}
686}
687
688type implSyncGetSyncGroupStatsClientCallRecv struct {
689 c *implSyncGetSyncGroupStatsClientCall
690}
691
692func (c implSyncGetSyncGroupStatsClientCallRecv) Advance() bool {
693 c.c.valRecv = SyncGroupStats{}
694 c.c.errRecv = c.c.Recv(&c.c.valRecv)
695 return c.c.errRecv == nil
696}
697func (c implSyncGetSyncGroupStatsClientCallRecv) Value() SyncGroupStats {
698 return c.c.valRecv
699}
700func (c implSyncGetSyncGroupStatsClientCallRecv) Err() error {
701 if c.c.errRecv == io.EOF {
702 return nil
703 }
704 return c.c.errRecv
705}
706func (c *implSyncGetSyncGroupStatsClientCall) Finish() (err error) {
707 err = c.ClientCall.Finish()
708 return
709}
710
711// SyncServerMethods is the interface a server writer
712// implements for Sync.
713//
714// Sync allows a device to GetDeltas from another device.
715type SyncServerMethods interface {
716 // GetDeltas returns a device's current generation vector and all
717 // the missing log records when compared to the incoming generation vector.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700718 GetDeltas(ctx *context.T, call SyncGetDeltasServerCall, in map[ObjId]GenVector, sgs map[ObjId]GroupIdSet, clientId DeviceId) (map[ObjId]GenVector, error)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700719 // GetObjectHistory returns the mutation history of a store object.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700720 GetObjectHistory(ctx *context.T, call SyncGetObjectHistoryServerCall, oid ObjId) (Version, error)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700721 // GetDeviceStats returns information on devices participating in
722 // peer-to-peer synchronization.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700723 GetDeviceStats(*context.T, SyncGetDeviceStatsServerCall) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700724 // GetSyncGroupMembers returns information on SyncGroup members.
725 // If SyncGroup names are specified, only members of these SyncGroups
726 // are returned. Otherwise, if the slice of names is nil or empty,
727 // members of all SyncGroups are returned.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700728 GetSyncGroupMembers(ctx *context.T, call SyncGetSyncGroupMembersServerCall, sgNames []string) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700729 // GetSyncGroupStats returns high-level information on all SyncGroups.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700730 GetSyncGroupStats(*context.T, SyncGetSyncGroupStatsServerCall) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700731 // Dump writes to the Sync log internal information used for debugging.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700732 Dump(*context.T, rpc.ServerCall) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700733}
734
735// SyncServerStubMethods is the server interface containing
736// Sync methods, as expected by rpc.Server.
737// The only difference between this interface and SyncServerMethods
738// is the streaming methods.
739type SyncServerStubMethods interface {
740 // GetDeltas returns a device's current generation vector and all
741 // the missing log records when compared to the incoming generation vector.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700742 GetDeltas(ctx *context.T, call *SyncGetDeltasServerCallStub, in map[ObjId]GenVector, sgs map[ObjId]GroupIdSet, clientId DeviceId) (map[ObjId]GenVector, error)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700743 // GetObjectHistory returns the mutation history of a store object.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700744 GetObjectHistory(ctx *context.T, call *SyncGetObjectHistoryServerCallStub, oid ObjId) (Version, error)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700745 // GetDeviceStats returns information on devices participating in
746 // peer-to-peer synchronization.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700747 GetDeviceStats(*context.T, *SyncGetDeviceStatsServerCallStub) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700748 // GetSyncGroupMembers returns information on SyncGroup members.
749 // If SyncGroup names are specified, only members of these SyncGroups
750 // are returned. Otherwise, if the slice of names is nil or empty,
751 // members of all SyncGroups are returned.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700752 GetSyncGroupMembers(ctx *context.T, call *SyncGetSyncGroupMembersServerCallStub, sgNames []string) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700753 // GetSyncGroupStats returns high-level information on all SyncGroups.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700754 GetSyncGroupStats(*context.T, *SyncGetSyncGroupStatsServerCallStub) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700755 // Dump writes to the Sync log internal information used for debugging.
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700756 Dump(*context.T, rpc.ServerCall) error
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700757}
758
759// SyncServerStub adds universal methods to SyncServerStubMethods.
760type SyncServerStub interface {
761 SyncServerStubMethods
762 // Describe the Sync interfaces.
763 Describe__() []rpc.InterfaceDesc
764}
765
766// SyncServer returns a server stub for Sync.
767// It converts an implementation of SyncServerMethods into
768// an object that may be used by rpc.Server.
769func SyncServer(impl SyncServerMethods) SyncServerStub {
770 stub := implSyncServerStub{
771 impl: impl,
772 }
773 // Initialize GlobState; always check the stub itself first, to handle the
774 // case where the user has the Glob method defined in their VDL source.
775 if gs := rpc.NewGlobState(stub); gs != nil {
776 stub.gs = gs
777 } else if gs := rpc.NewGlobState(impl); gs != nil {
778 stub.gs = gs
779 }
780 return stub
781}
782
783type implSyncServerStub struct {
784 impl SyncServerMethods
785 gs *rpc.GlobState
786}
787
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700788func (s implSyncServerStub) GetDeltas(ctx *context.T, call *SyncGetDeltasServerCallStub, i0 map[ObjId]GenVector, i1 map[ObjId]GroupIdSet, i2 DeviceId) (map[ObjId]GenVector, error) {
789 return s.impl.GetDeltas(ctx, call, i0, i1, i2)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700790}
791
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700792func (s implSyncServerStub) GetObjectHistory(ctx *context.T, call *SyncGetObjectHistoryServerCallStub, i0 ObjId) (Version, error) {
793 return s.impl.GetObjectHistory(ctx, call, i0)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700794}
795
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700796func (s implSyncServerStub) GetDeviceStats(ctx *context.T, call *SyncGetDeviceStatsServerCallStub) error {
797 return s.impl.GetDeviceStats(ctx, call)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700798}
799
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700800func (s implSyncServerStub) GetSyncGroupMembers(ctx *context.T, call *SyncGetSyncGroupMembersServerCallStub, i0 []string) error {
801 return s.impl.GetSyncGroupMembers(ctx, call, i0)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700802}
803
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700804func (s implSyncServerStub) GetSyncGroupStats(ctx *context.T, call *SyncGetSyncGroupStatsServerCallStub) error {
805 return s.impl.GetSyncGroupStats(ctx, call)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700806}
807
Adam Sadovskyb1b099b2015-04-21 15:40:10 -0700808func (s implSyncServerStub) Dump(ctx *context.T, call rpc.ServerCall) error {
809 return s.impl.Dump(ctx, call)
Adam Sadovskyb85e3532015-04-08 20:38:27 -0700810}
811
812func (s implSyncServerStub) Globber() *rpc.GlobState {
813 return s.gs
814}
815
816func (s implSyncServerStub) Describe__() []rpc.InterfaceDesc {
817 return []rpc.InterfaceDesc{SyncDesc}
818}
819
820// SyncDesc describes the Sync interface.
821var SyncDesc rpc.InterfaceDesc = descSync
822
823// descSync hides the desc to keep godoc clean.
824var descSync = rpc.InterfaceDesc{
825 Name: "Sync",
826 PkgPath: "v.io/syncbase/x/ref/services/syncbase/sync",
827 Doc: "// Sync allows a device to GetDeltas from another device.",
828 Methods: []rpc.MethodDesc{
829 {
830 Name: "GetDeltas",
831 Doc: "// GetDeltas returns a device's current generation vector and all\n// the missing log records when compared to the incoming generation vector.",
832 InArgs: []rpc.ArgDesc{
833 {"in", ``}, // map[ObjId]GenVector
834 {"sgs", ``}, // map[ObjId]GroupIdSet
835 {"clientId", ``}, // DeviceId
836 },
837 OutArgs: []rpc.ArgDesc{
838 {"", ``}, // map[ObjId]GenVector
839 },
840 Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Write"))},
841 },
842 {
843 Name: "GetObjectHistory",
844 Doc: "// GetObjectHistory returns the mutation history of a store object.",
845 InArgs: []rpc.ArgDesc{
846 {"oid", ``}, // ObjId
847 },
848 OutArgs: []rpc.ArgDesc{
849 {"", ``}, // Version
850 },
851 },
852 {
853 Name: "GetDeviceStats",
854 Doc: "// GetDeviceStats returns information on devices participating in\n// peer-to-peer synchronization.",
855 Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Admin"))},
856 },
857 {
858 Name: "GetSyncGroupMembers",
859 Doc: "// GetSyncGroupMembers returns information on SyncGroup members.\n// If SyncGroup names are specified, only members of these SyncGroups\n// are returned. Otherwise, if the slice of names is nil or empty,\n// members of all SyncGroups are returned.",
860 InArgs: []rpc.ArgDesc{
861 {"sgNames", ``}, // []string
862 },
863 Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Admin"))},
864 },
865 {
866 Name: "GetSyncGroupStats",
867 Doc: "// GetSyncGroupStats returns high-level information on all SyncGroups.",
868 Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Admin"))},
869 },
870 {
871 Name: "Dump",
872 Doc: "// Dump writes to the Sync log internal information used for debugging.",
873 Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Admin"))},
874 },
875 },
876}
877
878// SyncGetDeltasServerStream is the server stream for Sync.GetDeltas.
879type SyncGetDeltasServerStream interface {
880 // SendStream returns the send side of the Sync.GetDeltas server stream.
881 SendStream() interface {
882 // Send places the item onto the output stream. Returns errors encountered
883 // while sending. Blocks if there is no buffer space; will unblock when
884 // buffer space is available.
885 Send(item LogRec) error
886 }
887}
888
889// SyncGetDeltasServerCall represents the context passed to Sync.GetDeltas.
890type SyncGetDeltasServerCall interface {
891 rpc.ServerCall
892 SyncGetDeltasServerStream
893}
894
895// SyncGetDeltasServerCallStub is a wrapper that converts rpc.StreamServerCall into
896// a typesafe stub that implements SyncGetDeltasServerCall.
897type SyncGetDeltasServerCallStub struct {
898 rpc.StreamServerCall
899}
900
901// Init initializes SyncGetDeltasServerCallStub from rpc.StreamServerCall.
902func (s *SyncGetDeltasServerCallStub) Init(call rpc.StreamServerCall) {
903 s.StreamServerCall = call
904}
905
906// SendStream returns the send side of the Sync.GetDeltas server stream.
907func (s *SyncGetDeltasServerCallStub) SendStream() interface {
908 Send(item LogRec) error
909} {
910 return implSyncGetDeltasServerCallSend{s}
911}
912
913type implSyncGetDeltasServerCallSend struct {
914 s *SyncGetDeltasServerCallStub
915}
916
917func (s implSyncGetDeltasServerCallSend) Send(item LogRec) error {
918 return s.s.Send(item)
919}
920
921// SyncGetObjectHistoryServerStream is the server stream for Sync.GetObjectHistory.
922type SyncGetObjectHistoryServerStream interface {
923 // SendStream returns the send side of the Sync.GetObjectHistory server stream.
924 SendStream() interface {
925 // Send places the item onto the output stream. Returns errors encountered
926 // while sending. Blocks if there is no buffer space; will unblock when
927 // buffer space is available.
928 Send(item LogRec) error
929 }
930}
931
932// SyncGetObjectHistoryServerCall represents the context passed to Sync.GetObjectHistory.
933type SyncGetObjectHistoryServerCall interface {
934 rpc.ServerCall
935 SyncGetObjectHistoryServerStream
936}
937
938// SyncGetObjectHistoryServerCallStub is a wrapper that converts rpc.StreamServerCall into
939// a typesafe stub that implements SyncGetObjectHistoryServerCall.
940type SyncGetObjectHistoryServerCallStub struct {
941 rpc.StreamServerCall
942}
943
944// Init initializes SyncGetObjectHistoryServerCallStub from rpc.StreamServerCall.
945func (s *SyncGetObjectHistoryServerCallStub) Init(call rpc.StreamServerCall) {
946 s.StreamServerCall = call
947}
948
949// SendStream returns the send side of the Sync.GetObjectHistory server stream.
950func (s *SyncGetObjectHistoryServerCallStub) SendStream() interface {
951 Send(item LogRec) error
952} {
953 return implSyncGetObjectHistoryServerCallSend{s}
954}
955
956type implSyncGetObjectHistoryServerCallSend struct {
957 s *SyncGetObjectHistoryServerCallStub
958}
959
960func (s implSyncGetObjectHistoryServerCallSend) Send(item LogRec) error {
961 return s.s.Send(item)
962}
963
964// SyncGetDeviceStatsServerStream is the server stream for Sync.GetDeviceStats.
965type SyncGetDeviceStatsServerStream interface {
966 // SendStream returns the send side of the Sync.GetDeviceStats server stream.
967 SendStream() interface {
968 // Send places the item onto the output stream. Returns errors encountered
969 // while sending. Blocks if there is no buffer space; will unblock when
970 // buffer space is available.
971 Send(item DeviceStats) error
972 }
973}
974
975// SyncGetDeviceStatsServerCall represents the context passed to Sync.GetDeviceStats.
976type SyncGetDeviceStatsServerCall interface {
977 rpc.ServerCall
978 SyncGetDeviceStatsServerStream
979}
980
981// SyncGetDeviceStatsServerCallStub is a wrapper that converts rpc.StreamServerCall into
982// a typesafe stub that implements SyncGetDeviceStatsServerCall.
983type SyncGetDeviceStatsServerCallStub struct {
984 rpc.StreamServerCall
985}
986
987// Init initializes SyncGetDeviceStatsServerCallStub from rpc.StreamServerCall.
988func (s *SyncGetDeviceStatsServerCallStub) Init(call rpc.StreamServerCall) {
989 s.StreamServerCall = call
990}
991
992// SendStream returns the send side of the Sync.GetDeviceStats server stream.
993func (s *SyncGetDeviceStatsServerCallStub) SendStream() interface {
994 Send(item DeviceStats) error
995} {
996 return implSyncGetDeviceStatsServerCallSend{s}
997}
998
999type implSyncGetDeviceStatsServerCallSend struct {
1000 s *SyncGetDeviceStatsServerCallStub
1001}
1002
1003func (s implSyncGetDeviceStatsServerCallSend) Send(item DeviceStats) error {
1004 return s.s.Send(item)
1005}
1006
1007// SyncGetSyncGroupMembersServerStream is the server stream for Sync.GetSyncGroupMembers.
1008type SyncGetSyncGroupMembersServerStream interface {
1009 // SendStream returns the send side of the Sync.GetSyncGroupMembers server stream.
1010 SendStream() interface {
1011 // Send places the item onto the output stream. Returns errors encountered
1012 // while sending. Blocks if there is no buffer space; will unblock when
1013 // buffer space is available.
1014 Send(item SyncGroupMember) error
1015 }
1016}
1017
1018// SyncGetSyncGroupMembersServerCall represents the context passed to Sync.GetSyncGroupMembers.
1019type SyncGetSyncGroupMembersServerCall interface {
1020 rpc.ServerCall
1021 SyncGetSyncGroupMembersServerStream
1022}
1023
1024// SyncGetSyncGroupMembersServerCallStub is a wrapper that converts rpc.StreamServerCall into
1025// a typesafe stub that implements SyncGetSyncGroupMembersServerCall.
1026type SyncGetSyncGroupMembersServerCallStub struct {
1027 rpc.StreamServerCall
1028}
1029
1030// Init initializes SyncGetSyncGroupMembersServerCallStub from rpc.StreamServerCall.
1031func (s *SyncGetSyncGroupMembersServerCallStub) Init(call rpc.StreamServerCall) {
1032 s.StreamServerCall = call
1033}
1034
1035// SendStream returns the send side of the Sync.GetSyncGroupMembers server stream.
1036func (s *SyncGetSyncGroupMembersServerCallStub) SendStream() interface {
1037 Send(item SyncGroupMember) error
1038} {
1039 return implSyncGetSyncGroupMembersServerCallSend{s}
1040}
1041
1042type implSyncGetSyncGroupMembersServerCallSend struct {
1043 s *SyncGetSyncGroupMembersServerCallStub
1044}
1045
1046func (s implSyncGetSyncGroupMembersServerCallSend) Send(item SyncGroupMember) error {
1047 return s.s.Send(item)
1048}
1049
1050// SyncGetSyncGroupStatsServerStream is the server stream for Sync.GetSyncGroupStats.
1051type SyncGetSyncGroupStatsServerStream interface {
1052 // SendStream returns the send side of the Sync.GetSyncGroupStats server stream.
1053 SendStream() interface {
1054 // Send places the item onto the output stream. Returns errors encountered
1055 // while sending. Blocks if there is no buffer space; will unblock when
1056 // buffer space is available.
1057 Send(item SyncGroupStats) error
1058 }
1059}
1060
1061// SyncGetSyncGroupStatsServerCall represents the context passed to Sync.GetSyncGroupStats.
1062type SyncGetSyncGroupStatsServerCall interface {
1063 rpc.ServerCall
1064 SyncGetSyncGroupStatsServerStream
1065}
1066
1067// SyncGetSyncGroupStatsServerCallStub is a wrapper that converts rpc.StreamServerCall into
1068// a typesafe stub that implements SyncGetSyncGroupStatsServerCall.
1069type SyncGetSyncGroupStatsServerCallStub struct {
1070 rpc.StreamServerCall
1071}
1072
1073// Init initializes SyncGetSyncGroupStatsServerCallStub from rpc.StreamServerCall.
1074func (s *SyncGetSyncGroupStatsServerCallStub) Init(call rpc.StreamServerCall) {
1075 s.StreamServerCall = call
1076}
1077
1078// SendStream returns the send side of the Sync.GetSyncGroupStats server stream.
1079func (s *SyncGetSyncGroupStatsServerCallStub) SendStream() interface {
1080 Send(item SyncGroupStats) error
1081} {
1082 return implSyncGetSyncGroupStatsServerCallSend{s}
1083}
1084
1085type implSyncGetSyncGroupStatsServerCallSend struct {
1086 s *SyncGetSyncGroupStatsServerCallStub
1087}
1088
1089func (s implSyncGetSyncGroupStatsServerCallSend) Send(item SyncGroupStats) error {
1090 return s.s.Send(item)
1091}