Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 1 | // This file was auto-generated by the veyron vdl tool. |
Tilak Sharma | 43395f3 | 2014-05-27 11:33:38 -0700 | [diff] [blame] | 2 | // Source: vsync.vdl |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 3 | |
| 4 | package vsync |
| 5 | |
| 6 | import ( |
Tilak Sharma | 2af7002 | 2014-05-14 11:29:27 -0700 | [diff] [blame] | 7 | "veyron/services/store/raw" |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 8 | |
| 9 | "veyron2/storage" |
| 10 | |
| 11 | // The non-user imports are prefixed with "_gen_" to prevent collisions. |
Cosmos Nicolaou | b07fa77 | 2014-05-16 08:07:02 -0700 | [diff] [blame] | 12 | _gen_veyron2 "veyron2" |
Matt Rosencrantz | 29147f7 | 2014-06-06 12:46:01 -0700 | [diff] [blame] | 13 | _gen_context "veyron2/context" |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 14 | _gen_ipc "veyron2/ipc" |
| 15 | _gen_naming "veyron2/naming" |
Cosmos Nicolaou | ae67894 | 2014-05-17 17:21:43 -0700 | [diff] [blame] | 16 | _gen_rt "veyron2/rt" |
Todd Wang | 0ecdd7a | 2014-07-14 16:24:38 -0700 | [diff] [blame] | 17 | _gen_vdlutil "veyron2/vdl/vdlutil" |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 18 | _gen_wiretype "veyron2/wiretype" |
| 19 | ) |
| 20 | |
| 21 | // DeviceID is the globally unique ID of a device. |
| 22 | type DeviceID string |
| 23 | |
| 24 | // GenID is the unique ID per generation per device. |
| 25 | type GenID uint64 |
| 26 | |
| 27 | // LSN is the log sequence number. |
| 28 | type LSN uint64 |
| 29 | |
| 30 | // GenVector is the generation vector. |
| 31 | type GenVector map[DeviceID]GenID |
| 32 | |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 33 | // LogRec represents a single log record that is exchanged between two |
| 34 | // peers. |
| 35 | // |
| 36 | // It contains log related metadata: DevID is the id of the |
| 37 | // device that created the log record, GNum is the ID of the |
Himabindu Pucha | d94c2e9 | 2014-06-12 13:47:53 -0700 | [diff] [blame] | 38 | // generation that the log record is part of, LSN is the log |
| 39 | // sequence number of the log record in the generation GNum, |
| 40 | // and RecType is the type of log record. |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 41 | // |
| 42 | // It also contains information relevant to the updates to an object |
| 43 | // in the store: ObjID is the id of the object that was |
| 44 | // updated. CurVers is the current version number of the |
| 45 | // object. Parents can contain 0, 1 or 2 parent versions that the |
| 46 | // current version is derived from, and Value is the actual value of |
| 47 | // the object mutation. |
| 48 | type LogRec struct { |
| 49 | // Log related information. |
Himabindu Pucha | d94c2e9 | 2014-06-12 13:47:53 -0700 | [diff] [blame] | 50 | DevID DeviceID |
| 51 | GNum GenID |
| 52 | LSN LSN |
| 53 | RecType byte |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 54 | // Object related information. |
| 55 | ObjID storage.ID |
| 56 | CurVers storage.Version |
| 57 | Parents []storage.Version |
| 58 | Value LogValue |
| 59 | } |
| 60 | |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 61 | // LogValue represents an object mutation within a transaction. |
| 62 | type LogValue struct { |
| 63 | // Mutation is the store mutation representing the change in the object. |
| 64 | Mutation raw.Mutation |
| 65 | // SyncTime is the timestamp of the mutation when it arrives at the Sync server. |
| 66 | SyncTime int64 |
| 67 | // Delete indicates whether the mutation resulted in the object being |
| 68 | // deleted from the store. |
| 69 | Delete bool |
Benjamin Prosnitz | 59162a0 | 2014-07-02 10:07:14 -0700 | [diff] [blame] | 70 | // Continued tracks the transaction boundaries in a range of mutations. |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 71 | // It is set to true in all transaction mutations except the last one |
| 72 | // in which it is set to false to mark the end of the transaction. |
Benjamin Prosnitz | 59162a0 | 2014-07-02 10:07:14 -0700 | [diff] [blame] | 73 | Continued bool |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 74 | } |
| 75 | |
Himabindu Pucha | d94c2e9 | 2014-06-12 13:47:53 -0700 | [diff] [blame] | 76 | const ( |
| 77 | // NodeRec type log record adds a new node in the dag. |
| 78 | NodeRec = byte(0) |
| 79 | |
| 80 | // LinkRec type log record adds a new link in the dag. |
| 81 | LinkRec = byte(1) |
| 82 | ) |
| 83 | |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 84 | // Sync allows a device to GetDeltas from another device. |
| 85 | // Sync is the interface the client binds and uses. |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 86 | // Sync_ExcludingUniversal is the interface without internal framework-added methods |
| 87 | // to enable embedding without method collisions. Not to be used directly by clients. |
| 88 | type Sync_ExcludingUniversal interface { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 89 | // GetDeltas returns a device's current generation vector and all the missing log records |
| 90 | // when compared to the incoming generation vector. |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 91 | GetDeltas(ctx _gen_context.T, In GenVector, ClientID DeviceID, opts ..._gen_ipc.CallOpt) (reply SyncGetDeltasStream, err error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 92 | } |
| 93 | type Sync interface { |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 94 | _gen_ipc.UniversalServiceMethods |
| 95 | Sync_ExcludingUniversal |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | // SyncService is the interface the server implements. |
| 99 | type SyncService interface { |
| 100 | |
| 101 | // GetDeltas returns a device's current generation vector and all the missing log records |
| 102 | // when compared to the incoming generation vector. |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 103 | GetDeltas(context _gen_ipc.ServerContext, In GenVector, ClientID DeviceID, stream SyncServiceGetDeltasStream) (reply GenVector, err error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | // SyncGetDeltasStream is the interface for streaming responses of the method |
| 107 | // GetDeltas in the service interface Sync. |
| 108 | type SyncGetDeltasStream interface { |
| 109 | |
| 110 | // Recv returns the next item in the input stream, blocking until |
Benjamin Prosnitz | ce3898a | 2014-07-22 13:17:22 -0700 | [diff] [blame^] | 111 | // an item is available. Returns io.EOF to indicate graceful end of input. |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 112 | Recv() (item LogRec, err error) |
| 113 | |
Benjamin Prosnitz | ce3898a | 2014-07-22 13:17:22 -0700 | [diff] [blame^] | 114 | // Finish closes the stream and returns the positional return values for |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 115 | // call. |
| 116 | Finish() (reply GenVector, err error) |
| 117 | |
Benjamin Prosnitz | ce3898a | 2014-07-22 13:17:22 -0700 | [diff] [blame^] | 118 | // Cancel cancels the RPC, notifying the server to stop processing. |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 119 | Cancel() |
| 120 | } |
| 121 | |
| 122 | // Implementation of the SyncGetDeltasStream interface that is not exported. |
| 123 | type implSyncGetDeltasStream struct { |
Matt Rosencrantz | f5afcaf | 2014-06-02 11:31:22 -0700 | [diff] [blame] | 124 | clientCall _gen_ipc.Call |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | func (c *implSyncGetDeltasStream) Recv() (item LogRec, err error) { |
| 128 | err = c.clientCall.Recv(&item) |
| 129 | return |
| 130 | } |
| 131 | |
| 132 | func (c *implSyncGetDeltasStream) Finish() (reply GenVector, err error) { |
| 133 | if ierr := c.clientCall.Finish(&reply, &err); ierr != nil { |
| 134 | err = ierr |
| 135 | } |
| 136 | return |
| 137 | } |
| 138 | |
| 139 | func (c *implSyncGetDeltasStream) Cancel() { |
| 140 | c.clientCall.Cancel() |
| 141 | } |
| 142 | |
| 143 | // SyncServiceGetDeltasStream is the interface for streaming responses of the method |
| 144 | // GetDeltas in the service interface Sync. |
| 145 | type SyncServiceGetDeltasStream interface { |
| 146 | // Send places the item onto the output stream, blocking if there is no buffer |
Benjamin Prosnitz | ce3898a | 2014-07-22 13:17:22 -0700 | [diff] [blame^] | 147 | // space available. |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 148 | Send(item LogRec) error |
| 149 | } |
| 150 | |
| 151 | // Implementation of the SyncServiceGetDeltasStream interface that is not exported. |
| 152 | type implSyncServiceGetDeltasStream struct { |
| 153 | serverCall _gen_ipc.ServerCall |
| 154 | } |
| 155 | |
| 156 | func (s *implSyncServiceGetDeltasStream) Send(item LogRec) error { |
| 157 | return s.serverCall.Send(item) |
| 158 | } |
| 159 | |
| 160 | // BindSync returns the client stub implementing the Sync |
| 161 | // interface. |
| 162 | // |
| 163 | // If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the |
| 164 | // global Runtime is used. |
| 165 | func BindSync(name string, opts ..._gen_ipc.BindOpt) (Sync, error) { |
| 166 | var client _gen_ipc.Client |
| 167 | switch len(opts) { |
| 168 | case 0: |
| 169 | client = _gen_rt.R().Client() |
| 170 | case 1: |
| 171 | switch o := opts[0].(type) { |
Cosmos Nicolaou | b07fa77 | 2014-05-16 08:07:02 -0700 | [diff] [blame] | 172 | case _gen_veyron2.Runtime: |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 173 | client = o.Client() |
| 174 | case _gen_ipc.Client: |
| 175 | client = o |
| 176 | default: |
Todd Wang | 0ecdd7a | 2014-07-14 16:24:38 -0700 | [diff] [blame] | 177 | return nil, _gen_vdlutil.ErrUnrecognizedOption |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 178 | } |
| 179 | default: |
Todd Wang | 0ecdd7a | 2014-07-14 16:24:38 -0700 | [diff] [blame] | 180 | return nil, _gen_vdlutil.ErrTooManyOptionsToBind |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 181 | } |
| 182 | stub := &clientStubSync{client: client, name: name} |
| 183 | |
| 184 | return stub, nil |
| 185 | } |
| 186 | |
| 187 | // NewServerSync creates a new server stub. |
| 188 | // |
| 189 | // It takes a regular server implementing the SyncService |
| 190 | // interface, and returns a new server stub. |
| 191 | func NewServerSync(server SyncService) interface{} { |
| 192 | return &ServerStubSync{ |
| 193 | service: server, |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | // clientStubSync implements Sync. |
| 198 | type clientStubSync struct { |
| 199 | client _gen_ipc.Client |
| 200 | name string |
| 201 | } |
| 202 | |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 203 | func (__gen_c *clientStubSync) GetDeltas(ctx _gen_context.T, In GenVector, ClientID DeviceID, opts ..._gen_ipc.CallOpt) (reply SyncGetDeltasStream, err error) { |
Matt Rosencrantz | f5afcaf | 2014-06-02 11:31:22 -0700 | [diff] [blame] | 204 | var call _gen_ipc.Call |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 205 | if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetDeltas", []interface{}{In, ClientID}, opts...); err != nil { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 206 | return |
| 207 | } |
| 208 | reply = &implSyncGetDeltasStream{clientCall: call} |
| 209 | return |
| 210 | } |
| 211 | |
Matt Rosencrantz | 29147f7 | 2014-06-06 12:46:01 -0700 | [diff] [blame] | 212 | func (__gen_c *clientStubSync) UnresolveStep(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply []string, err error) { |
Matt Rosencrantz | f5afcaf | 2014-06-02 11:31:22 -0700 | [diff] [blame] | 213 | var call _gen_ipc.Call |
| 214 | if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "UnresolveStep", nil, opts...); err != nil { |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 215 | return |
| 216 | } |
| 217 | if ierr := call.Finish(&reply, &err); ierr != nil { |
| 218 | err = ierr |
| 219 | } |
| 220 | return |
| 221 | } |
| 222 | |
Matt Rosencrantz | 29147f7 | 2014-06-06 12:46:01 -0700 | [diff] [blame] | 223 | func (__gen_c *clientStubSync) Signature(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply _gen_ipc.ServiceSignature, err error) { |
Matt Rosencrantz | f5afcaf | 2014-06-02 11:31:22 -0700 | [diff] [blame] | 224 | var call _gen_ipc.Call |
| 225 | if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Signature", nil, opts...); err != nil { |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 226 | return |
| 227 | } |
| 228 | if ierr := call.Finish(&reply, &err); ierr != nil { |
| 229 | err = ierr |
| 230 | } |
| 231 | return |
| 232 | } |
| 233 | |
Matt Rosencrantz | 29147f7 | 2014-06-06 12:46:01 -0700 | [diff] [blame] | 234 | func (__gen_c *clientStubSync) GetMethodTags(ctx _gen_context.T, method string, opts ..._gen_ipc.CallOpt) (reply []interface{}, err error) { |
Matt Rosencrantz | f5afcaf | 2014-06-02 11:31:22 -0700 | [diff] [blame] | 235 | var call _gen_ipc.Call |
| 236 | if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 237 | return |
| 238 | } |
| 239 | if ierr := call.Finish(&reply, &err); ierr != nil { |
| 240 | err = ierr |
| 241 | } |
| 242 | return |
| 243 | } |
| 244 | |
| 245 | // ServerStubSync wraps a server that implements |
| 246 | // SyncService and provides an object that satisfies |
| 247 | // the requirements of veyron2/ipc.ReflectInvoker. |
| 248 | type ServerStubSync struct { |
| 249 | service SyncService |
| 250 | } |
| 251 | |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 252 | func (__gen_s *ServerStubSync) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) { |
| 253 | // TODO(bprosnitz) GetMethodTags() will be replaces with Signature(). |
| 254 | // Note: This exhibits some weird behavior like returning a nil error if the method isn't found. |
| 255 | // This will change when it is replaced with Signature(). |
| 256 | switch method { |
| 257 | case "GetDeltas": |
| 258 | return []interface{}{}, nil |
| 259 | default: |
| 260 | return nil, nil |
| 261 | } |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 262 | } |
| 263 | |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 264 | func (__gen_s *ServerStubSync) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 265 | result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)} |
| 266 | result.Methods["GetDeltas"] = _gen_ipc.MethodSignature{ |
| 267 | InArgs: []_gen_ipc.MethodArgument{ |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 268 | {Name: "In", Type: 67}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 269 | {Name: "ClientID", Type: 65}, |
| 270 | }, |
| 271 | OutArgs: []_gen_ipc.MethodArgument{ |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 272 | {Name: "Out", Type: 67}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 273 | {Name: "Err", Type: 68}, |
| 274 | }, |
| 275 | |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 276 | OutStream: 82, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 277 | } |
| 278 | |
Todd Wang | 0ecdd7a | 2014-07-14 16:24:38 -0700 | [diff] [blame] | 279 | result.TypeDefs = []_gen_vdlutil.Any{ |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 280 | _gen_wiretype.NamedPrimitiveType{Type: 0x3, Name: "veyron/runtimes/google/vsync.DeviceID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron/runtimes/google/vsync.GenID", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x41, Elem: 0x42, Name: "veyron/runtimes/google/vsync.GenVector", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron/runtimes/google/vsync.LSN", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x46, Len: 0x10, Name: "veyron2/storage.ID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron2/storage.Version", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x48, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron2/storage.TagOp", Tags: []string(nil)}, _gen_wiretype.StructType{ |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 281 | []_gen_wiretype.FieldType{ |
| 282 | _gen_wiretype.FieldType{Type: 0x4b, Name: "Op"}, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 283 | _gen_wiretype.FieldType{Type: 0x47, Name: "ACL"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 284 | }, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 285 | "veyron2/storage.Tag", []string(nil)}, |
| 286 | _gen_wiretype.SliceType{Elem: 0x4c, Name: "veyron2/storage.TagList", Tags: []string(nil)}, _gen_wiretype.StructType{ |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 287 | []_gen_wiretype.FieldType{ |
| 288 | _gen_wiretype.FieldType{Type: 0x3, Name: "Name"}, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 289 | _gen_wiretype.FieldType{Type: 0x47, Name: "ID"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 290 | }, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 291 | "veyron2/storage.DEntry", []string(nil)}, |
| 292 | _gen_wiretype.SliceType{Elem: 0x4e, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{ |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 293 | []_gen_wiretype.FieldType{ |
| 294 | _gen_wiretype.FieldType{Type: 0x47, Name: "ID"}, |
| 295 | _gen_wiretype.FieldType{Type: 0x48, Name: "PriorVersion"}, |
| 296 | _gen_wiretype.FieldType{Type: 0x48, Name: "Version"}, |
| 297 | _gen_wiretype.FieldType{Type: 0x2, Name: "IsRoot"}, |
| 298 | _gen_wiretype.FieldType{Type: 0x4a, Name: "Value"}, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 299 | _gen_wiretype.FieldType{Type: 0x4d, Name: "Tags"}, |
| 300 | _gen_wiretype.FieldType{Type: 0x4f, Name: "Dir"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 301 | }, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 302 | "veyron/services/store/raw.Mutation", []string(nil)}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 303 | _gen_wiretype.StructType{ |
| 304 | []_gen_wiretype.FieldType{ |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 305 | _gen_wiretype.FieldType{Type: 0x50, Name: "Mutation"}, |
Raja Daoud | c861ab4 | 2014-05-20 14:32:54 -0700 | [diff] [blame] | 306 | _gen_wiretype.FieldType{Type: 0x25, Name: "SyncTime"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 307 | _gen_wiretype.FieldType{Type: 0x2, Name: "Delete"}, |
Benjamin Prosnitz | 59162a0 | 2014-07-02 10:07:14 -0700 | [diff] [blame] | 308 | _gen_wiretype.FieldType{Type: 0x2, Name: "Continued"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 309 | }, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 310 | "veyron/runtimes/google/vsync.LogValue", []string(nil)}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 311 | _gen_wiretype.StructType{ |
| 312 | []_gen_wiretype.FieldType{ |
| 313 | _gen_wiretype.FieldType{Type: 0x41, Name: "DevID"}, |
| 314 | _gen_wiretype.FieldType{Type: 0x42, Name: "GNum"}, |
| 315 | _gen_wiretype.FieldType{Type: 0x45, Name: "LSN"}, |
Himabindu Pucha | d94c2e9 | 2014-06-12 13:47:53 -0700 | [diff] [blame] | 316 | _gen_wiretype.FieldType{Type: 0x46, Name: "RecType"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 317 | _gen_wiretype.FieldType{Type: 0x47, Name: "ObjID"}, |
| 318 | _gen_wiretype.FieldType{Type: 0x48, Name: "CurVers"}, |
| 319 | _gen_wiretype.FieldType{Type: 0x49, Name: "Parents"}, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 320 | _gen_wiretype.FieldType{Type: 0x51, Name: "Value"}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 321 | }, |
Todd Wang | e5d67b4 | 2014-05-27 10:48:07 -0700 | [diff] [blame] | 322 | "veyron/runtimes/google/vsync.LogRec", []string(nil)}, |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 323 | } |
| 324 | |
| 325 | return result, nil |
| 326 | } |
| 327 | |
Benjamin Prosnitz | dcddb93 | 2014-05-27 15:55:58 -0700 | [diff] [blame] | 328 | func (__gen_s *ServerStubSync) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) { |
| 329 | if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 330 | return unresolver.UnresolveStep(call) |
| 331 | } |
| 332 | if call.Server() == nil { |
| 333 | return |
| 334 | } |
| 335 | var published []string |
| 336 | if published, err = call.Server().Published(); err != nil || published == nil { |
| 337 | return |
| 338 | } |
| 339 | reply = make([]string, len(published)) |
| 340 | for i, p := range published { |
| 341 | reply[i] = _gen_naming.Join(p, call.Name()) |
| 342 | } |
| 343 | return |
| 344 | } |
| 345 | |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 346 | func (__gen_s *ServerStubSync) GetDeltas(call _gen_ipc.ServerCall, In GenVector, ClientID DeviceID) (reply GenVector, err error) { |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 347 | stream := &implSyncServiceGetDeltasStream{serverCall: call} |
Jiri Simsa | 3ac5fc5 | 2014-06-30 19:49:09 +0000 | [diff] [blame] | 348 | reply, err = __gen_s.service.GetDeltas(call, In, ClientID, stream) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 349 | return |
| 350 | } |