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