blob: 1806f07b8ffbd9d3353b6f2d93e1339bb84ab220 [file] [log] [blame]
Todd Wange5d67b42014-05-27 10:48:07 -07001// This file was auto-generated by the veyron vdl tool.
Tilak Sharma43395f32014-05-27 11:33:38 -07002// Source: cache.vdl
Jiri Simsa5293dcb2014-05-10 09:56:38 -07003
4package sample
5
6import (
7 // The non-user imports are prefixed with "_gen_" to prevent collisions.
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -07008 _gen_io "io"
Cosmos Nicolaoub07fa772014-05-16 08:07:02 -07009 _gen_veyron2 "veyron2"
Matt Rosencrantz29147f72014-06-06 12:46:01 -070010 _gen_context "veyron2/context"
Jiri Simsa5293dcb2014-05-10 09:56:38 -070011 _gen_ipc "veyron2/ipc"
12 _gen_naming "veyron2/naming"
Cosmos Nicolaouae678942014-05-17 17:21:43 -070013 _gen_rt "veyron2/rt"
Todd Wang0ecdd7a2014-07-14 16:24:38 -070014 _gen_vdlutil "veyron2/vdl/vdlutil"
Jiri Simsa5293dcb2014-05-10 09:56:38 -070015 _gen_wiretype "veyron2/wiretype"
16)
17
18// KeyValuePair is a representation of a cached key and value pair.
19type KeyValuePair struct {
20 Key string
Todd Wang0ecdd7a2014-07-14 16:24:38 -070021 Value _gen_vdlutil.Any
Jiri Simsa5293dcb2014-05-10 09:56:38 -070022}
23
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -070024// TODO(bprosnitz) Remove this line once signatures are updated to use typevals.
25// It corrects a bug where _gen_wiretype is unused in VDL pacakges where only bootstrap types are used on interfaces.
26const _ = _gen_wiretype.TypeIDInvalid
27
Jiri Simsa5293dcb2014-05-10 09:56:38 -070028// A Cache service mimics the memcache interface.
29// Cache is the interface the client binds and uses.
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -070030// Cache_ExcludingUniversal is the interface without internal framework-added methods
31// to enable embedding without method collisions. Not to be used directly by clients.
32type Cache_ExcludingUniversal interface {
Jiri Simsa5293dcb2014-05-10 09:56:38 -070033 // Set sets a value for a key.
Todd Wang0ecdd7a2014-07-14 16:24:38 -070034 Set(ctx _gen_context.T, key string, value _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070035 // Get returns the value for a key. If the value is not found, returns
36 // a not found error.
Todd Wang0ecdd7a2014-07-14 16:24:38 -070037 Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070038 // Same as Get, but casts the return argument to an byte.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070039 GetAsByte(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply byte, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070040 // Same as Get, but casts the return argument to an int32.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070041 GetAsInt32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply int32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070042 // Same as Get, but casts the return argument to an int64.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070043 GetAsInt64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070044 // Same as Get, but casts the return argument to an uint32.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070045 GetAsUint32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply uint32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070046 // Same as Get, but casts the return argument to an uint64.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070047 GetAsUint64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply uint64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070048 // Same as Get, but casts the return argument to an float32.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070049 GetAsFloat32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply float32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070050 // Same as Get, but casts the return argument to an float64.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070051 GetAsFloat64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply float64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070052 // Same as Get, but casts the return argument to a string.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070053 GetAsString(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply string, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070054 // Same as Get, but casts the return argument to a bool.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070055 GetAsBool(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply bool, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070056 // Same as Get, but casts the return argument to an error.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070057 GetAsError(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply error, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070058 // AsMap returns the full contents of the cache as a map.
Todd Wang0ecdd7a2014-07-14 16:24:38 -070059 AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdlutil.Any, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070060 // KeyValuePairs returns the full contents of the cache as a slice of pairs.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070061 KeyValuePairs(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply []KeyValuePair, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070062 // MostRecentSet returns the key and value and the timestamp for the most
63 // recent set operation
64 // TODO(bprosnitz) support type types and change time to native time type
Matt Rosencrantz29147f72014-06-06 12:46:01 -070065 MostRecentSet(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (value KeyValuePair, time int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070066 // KeyPage indexes into the keys (in alphanumerically sorted order) and
67 // returns the indexth page of 10 keys.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070068 KeyPage(ctx _gen_context.T, index int64, opts ..._gen_ipc.CallOpt) (reply [10]string, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070069 // Size returns the total number of entries in the cache.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070070 Size(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070071 // MultiGet sets up a stream that allows fetching multiple keys.
Matt Rosencrantz29147f72014-06-06 12:46:01 -070072 MultiGet(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply CacheMultiGetStream, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070073}
74type Cache interface {
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -070075 _gen_ipc.UniversalServiceMethods
76 Cache_ExcludingUniversal
Jiri Simsa5293dcb2014-05-10 09:56:38 -070077}
78
79// CacheService is the interface the server implements.
80type CacheService interface {
81
82 // Set sets a value for a key.
Todd Wang0ecdd7a2014-07-14 16:24:38 -070083 Set(context _gen_ipc.ServerContext, key string, value _gen_vdlutil.Any) (err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070084 // Get returns the value for a key. If the value is not found, returns
85 // a not found error.
Todd Wang0ecdd7a2014-07-14 16:24:38 -070086 Get(context _gen_ipc.ServerContext, key string) (reply _gen_vdlutil.Any, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070087 // Same as Get, but casts the return argument to an byte.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070088 GetAsByte(context _gen_ipc.ServerContext, key string) (reply byte, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070089 // Same as Get, but casts the return argument to an int32.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070090 GetAsInt32(context _gen_ipc.ServerContext, key string) (reply int32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070091 // Same as Get, but casts the return argument to an int64.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070092 GetAsInt64(context _gen_ipc.ServerContext, key string) (reply int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070093 // Same as Get, but casts the return argument to an uint32.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070094 GetAsUint32(context _gen_ipc.ServerContext, key string) (reply uint32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070095 // Same as Get, but casts the return argument to an uint64.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070096 GetAsUint64(context _gen_ipc.ServerContext, key string) (reply uint64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070097 // Same as Get, but casts the return argument to an float32.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -070098 GetAsFloat32(context _gen_ipc.ServerContext, key string) (reply float32, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070099 // Same as Get, but casts the return argument to an float64.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700100 GetAsFloat64(context _gen_ipc.ServerContext, key string) (reply float64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700101 // Same as Get, but casts the return argument to a string.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700102 GetAsString(context _gen_ipc.ServerContext, key string) (reply string, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700103 // Same as Get, but casts the return argument to a bool.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700104 GetAsBool(context _gen_ipc.ServerContext, key string) (reply bool, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700105 // Same as Get, but casts the return argument to an error.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700106 GetAsError(context _gen_ipc.ServerContext, key string) (reply error, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700107 // AsMap returns the full contents of the cache as a map.
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700108 AsMap(context _gen_ipc.ServerContext) (reply map[string]_gen_vdlutil.Any, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700109 // KeyValuePairs returns the full contents of the cache as a slice of pairs.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700110 KeyValuePairs(context _gen_ipc.ServerContext) (reply []KeyValuePair, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700111 // MostRecentSet returns the key and value and the timestamp for the most
112 // recent set operation
113 // TODO(bprosnitz) support type types and change time to native time type
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700114 MostRecentSet(context _gen_ipc.ServerContext) (value KeyValuePair, time int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700115 // KeyPage indexes into the keys (in alphanumerically sorted order) and
116 // returns the indexth page of 10 keys.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700117 KeyPage(context _gen_ipc.ServerContext, index int64) (reply [10]string, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700118 // Size returns the total number of entries in the cache.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700119 Size(context _gen_ipc.ServerContext) (reply int64, err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700120 // MultiGet sets up a stream that allows fetching multiple keys.
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700121 MultiGet(context _gen_ipc.ServerContext, stream CacheServiceMultiGetStream) (err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700122}
123
124// CacheMultiGetStream is the interface for streaming responses of the method
125// MultiGet in the service interface Cache.
126type CacheMultiGetStream interface {
127
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700128 // Send places the item onto the output stream, blocking if there is no
129 // buffer space available. Calls to Send after having called CloseSend
130 // or Cancel will fail. Any blocked Send calls will be unblocked upon
131 // calling Cancel.
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700132 Send(item string) error
133
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700134 // CloseSend indicates to the server that no more items will be sent;
135 // server Recv calls will receive io.EOF after all sent items. This is
136 // an optional call - it's used by streaming clients that need the
137 // server to receive the io.EOF terminator before the client calls
138 // Finish (for example, if the client needs to continue receiving items
139 // from the server after having finished sending).
140 // Calls to CloseSend after having called Cancel will fail.
141 // Like Send, CloseSend blocks when there's no buffer space available.
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700142 CloseSend() error
143
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700144 // Advance stages an element so the client can retrieve it
145 // with Value. Advance returns true iff there is an
146 // element to retrieve. The client must call Advance before
147 // calling Value. The client must call Cancel if it does
148 // not iterate through all elements (i.e. until Advance
149 // returns false). Advance may block if an element is not
150 // immediately available.
151 Advance() bool
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700152
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700153 // Value returns the element that was staged by Advance.
154 // Value may panic if Advance returned false or was not
155 // called at all. Value does not block.
156 Value() _gen_vdlutil.Any
157
158 // Err returns a non-nil error iff the stream encountered
159 // any errors. Err does not block.
160 Err() error
161
162 // Finish performs the equivalent of CloseSend, then blocks until the server
163 // is done, and returns the positional return values for call.
164 //
165 // If Cancel has been called, Finish will return immediately; the output of
166 // Finish could either be an error signalling cancelation, or the correct
167 // positional return values from the server depending on the timing of the
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700168 // call.
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700169 //
170 // Calling Finish is mandatory for releasing stream resources, unless Cancel
171 // has been called or any of the other methods return a non-EOF error.
172 // Finish should be called at most once.
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700173 Finish() (err error)
174
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700175 // Cancel cancels the RPC, notifying the server to stop processing. It
176 // is safe to call Cancel concurrently with any of the other stream methods.
177 // Calling Cancel after Finish has returned is a no-op.
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700178 Cancel()
179}
180
181// Implementation of the CacheMultiGetStream interface that is not exported.
182type implCacheMultiGetStream struct {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700183 clientCall _gen_ipc.Call
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700184 val _gen_vdlutil.Any
185 err error
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700186}
187
188func (c *implCacheMultiGetStream) Send(item string) error {
189 return c.clientCall.Send(item)
190}
191
192func (c *implCacheMultiGetStream) CloseSend() error {
193 return c.clientCall.CloseSend()
194}
195
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700196func (c *implCacheMultiGetStream) Advance() bool {
197 c.val = nil
198 c.err = c.clientCall.Recv(&c.val)
199 return c.err == nil
200}
201
202func (c *implCacheMultiGetStream) Value() _gen_vdlutil.Any {
203 return c.val
204}
205
206func (c *implCacheMultiGetStream) Err() error {
207 if c.err == _gen_io.EOF {
208 return nil
209 }
210 return c.err
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700211}
212
213func (c *implCacheMultiGetStream) Finish() (err error) {
214 if ierr := c.clientCall.Finish(&err); ierr != nil {
215 err = ierr
216 }
217 return
218}
219
220func (c *implCacheMultiGetStream) Cancel() {
221 c.clientCall.Cancel()
222}
223
224// CacheServiceMultiGetStream is the interface for streaming responses of the method
225// MultiGet in the service interface Cache.
226type CacheServiceMultiGetStream interface {
227 // Send places the item onto the output stream, blocking if there is no buffer
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700228 // space available. If the client has canceled, an error is returned.
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700229 Send(item _gen_vdlutil.Any) error
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700230
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700231 // Advance stages an element so the client can retrieve it
232 // with Value. Advance returns true iff there is an
233 // element to retrieve. The client must call Advance before
234 // calling Value. The client must call Cancel if it does
235 // not iterate through all elements (i.e. until Advance
236 // returns false). Advance may block if an element is not
237 // immediately available.
238 Advance() bool
239
240 // Value returns the element that was staged by Advance.
241 // Value may panic if Advance returned false or was not
242 // called at all. Value does not block.
243 //
244 // In general, Value is undefined if the underlying collection
245 // of elements changes while iteration is in progress. If
246 // <DataProvider> supports concurrent modification, it should
247 // document its behavior.
248 Value() string
249
250 // Err returns a non-nil error iff the stream encountered
251 // any errors. Err does not block.
252 Err() error
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700253}
254
255// Implementation of the CacheServiceMultiGetStream interface that is not exported.
256type implCacheServiceMultiGetStream struct {
257 serverCall _gen_ipc.ServerCall
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700258 val string
259 err error
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700260}
261
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700262func (s *implCacheServiceMultiGetStream) Send(item _gen_vdlutil.Any) error {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700263 return s.serverCall.Send(item)
264}
265
Shyam Jayaramanc4aed6e2014-07-22 14:25:06 -0700266func (s *implCacheServiceMultiGetStream) Advance() bool {
267 s.err = s.serverCall.Recv(&s.val)
268 return s.err == nil
269}
270
271func (s *implCacheServiceMultiGetStream) Value() string {
272 return s.val
273}
274
275func (s *implCacheServiceMultiGetStream) Err() error {
276 if s.err == _gen_io.EOF {
277 return nil
278 }
279 return s.err
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700280}
281
282// BindCache returns the client stub implementing the Cache
283// interface.
284//
285// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
286// global Runtime is used.
287func BindCache(name string, opts ..._gen_ipc.BindOpt) (Cache, error) {
288 var client _gen_ipc.Client
289 switch len(opts) {
290 case 0:
291 client = _gen_rt.R().Client()
292 case 1:
293 switch o := opts[0].(type) {
Cosmos Nicolaoub07fa772014-05-16 08:07:02 -0700294 case _gen_veyron2.Runtime:
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700295 client = o.Client()
296 case _gen_ipc.Client:
297 client = o
298 default:
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700299 return nil, _gen_vdlutil.ErrUnrecognizedOption
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700300 }
301 default:
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700302 return nil, _gen_vdlutil.ErrTooManyOptionsToBind
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700303 }
304 stub := &clientStubCache{client: client, name: name}
305
306 return stub, nil
307}
308
309// NewServerCache creates a new server stub.
310//
311// It takes a regular server implementing the CacheService
312// interface, and returns a new server stub.
313func NewServerCache(server CacheService) interface{} {
314 return &ServerStubCache{
315 service: server,
316 }
317}
318
319// clientStubCache implements Cache.
320type clientStubCache struct {
321 client _gen_ipc.Client
322 name string
323}
324
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700325func (__gen_c *clientStubCache) Set(ctx _gen_context.T, key string, value _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700326 var call _gen_ipc.Call
327 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Set", []interface{}{key, value}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700328 return
329 }
330 if ierr := call.Finish(&err); ierr != nil {
331 err = ierr
332 }
333 return
334}
335
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700336func (__gen_c *clientStubCache) Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700337 var call _gen_ipc.Call
338 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Get", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700339 return
340 }
341 if ierr := call.Finish(&reply, &err); ierr != nil {
342 err = ierr
343 }
344 return
345}
346
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700347func (__gen_c *clientStubCache) GetAsByte(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply byte, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700348 var call _gen_ipc.Call
349 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsByte", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700350 return
351 }
352 if ierr := call.Finish(&reply, &err); ierr != nil {
353 err = ierr
354 }
355 return
356}
357
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700358func (__gen_c *clientStubCache) GetAsInt32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply int32, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700359 var call _gen_ipc.Call
360 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsInt32", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700361 return
362 }
363 if ierr := call.Finish(&reply, &err); ierr != nil {
364 err = ierr
365 }
366 return
367}
368
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700369func (__gen_c *clientStubCache) GetAsInt64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply int64, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700370 var call _gen_ipc.Call
371 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsInt64", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700372 return
373 }
374 if ierr := call.Finish(&reply, &err); ierr != nil {
375 err = ierr
376 }
377 return
378}
379
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700380func (__gen_c *clientStubCache) GetAsUint32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply uint32, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700381 var call _gen_ipc.Call
382 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsUint32", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700383 return
384 }
385 if ierr := call.Finish(&reply, &err); ierr != nil {
386 err = ierr
387 }
388 return
389}
390
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700391func (__gen_c *clientStubCache) GetAsUint64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply uint64, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700392 var call _gen_ipc.Call
393 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsUint64", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700394 return
395 }
396 if ierr := call.Finish(&reply, &err); ierr != nil {
397 err = ierr
398 }
399 return
400}
401
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700402func (__gen_c *clientStubCache) GetAsFloat32(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply float32, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700403 var call _gen_ipc.Call
404 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsFloat32", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700405 return
406 }
407 if ierr := call.Finish(&reply, &err); ierr != nil {
408 err = ierr
409 }
410 return
411}
412
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700413func (__gen_c *clientStubCache) GetAsFloat64(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply float64, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700414 var call _gen_ipc.Call
415 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsFloat64", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700416 return
417 }
418 if ierr := call.Finish(&reply, &err); ierr != nil {
419 err = ierr
420 }
421 return
422}
423
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700424func (__gen_c *clientStubCache) GetAsString(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply string, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700425 var call _gen_ipc.Call
426 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsString", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700427 return
428 }
429 if ierr := call.Finish(&reply, &err); ierr != nil {
430 err = ierr
431 }
432 return
433}
434
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700435func (__gen_c *clientStubCache) GetAsBool(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply bool, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700436 var call _gen_ipc.Call
437 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsBool", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700438 return
439 }
440 if ierr := call.Finish(&reply, &err); ierr != nil {
441 err = ierr
442 }
443 return
444}
445
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700446func (__gen_c *clientStubCache) GetAsError(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply error, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700447 var call _gen_ipc.Call
448 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetAsError", []interface{}{key}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700449 return
450 }
451 if ierr := call.Finish(&reply, &err); ierr != nil {
452 err = ierr
453 }
454 return
455}
456
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700457func (__gen_c *clientStubCache) AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdlutil.Any, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700458 var call _gen_ipc.Call
459 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "AsMap", nil, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700460 return
461 }
462 if ierr := call.Finish(&reply, &err); ierr != nil {
463 err = ierr
464 }
465 return
466}
467
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700468func (__gen_c *clientStubCache) KeyValuePairs(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply []KeyValuePair, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700469 var call _gen_ipc.Call
470 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "KeyValuePairs", nil, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700471 return
472 }
473 if ierr := call.Finish(&reply, &err); ierr != nil {
474 err = ierr
475 }
476 return
477}
478
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700479func (__gen_c *clientStubCache) MostRecentSet(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (value KeyValuePair, time int64, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700480 var call _gen_ipc.Call
481 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "MostRecentSet", nil, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700482 return
483 }
484 if ierr := call.Finish(&value, &time, &err); ierr != nil {
485 err = ierr
486 }
487 return
488}
489
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700490func (__gen_c *clientStubCache) KeyPage(ctx _gen_context.T, index int64, opts ..._gen_ipc.CallOpt) (reply [10]string, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700491 var call _gen_ipc.Call
492 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "KeyPage", []interface{}{index}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700493 return
494 }
495 if ierr := call.Finish(&reply, &err); ierr != nil {
496 err = ierr
497 }
498 return
499}
500
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700501func (__gen_c *clientStubCache) Size(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply int64, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700502 var call _gen_ipc.Call
503 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Size", nil, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700504 return
505 }
506 if ierr := call.Finish(&reply, &err); ierr != nil {
507 err = ierr
508 }
509 return
510}
511
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700512func (__gen_c *clientStubCache) MultiGet(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply CacheMultiGetStream, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700513 var call _gen_ipc.Call
514 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "MultiGet", nil, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700515 return
516 }
517 reply = &implCacheMultiGetStream{clientCall: call}
518 return
519}
520
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700521func (__gen_c *clientStubCache) UnresolveStep(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply []string, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700522 var call _gen_ipc.Call
523 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "UnresolveStep", nil, opts...); err != nil {
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -0700524 return
525 }
526 if ierr := call.Finish(&reply, &err); ierr != nil {
527 err = ierr
528 }
529 return
530}
531
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700532func (__gen_c *clientStubCache) Signature(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply _gen_ipc.ServiceSignature, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700533 var call _gen_ipc.Call
534 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Signature", nil, opts...); err != nil {
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -0700535 return
536 }
537 if ierr := call.Finish(&reply, &err); ierr != nil {
538 err = ierr
539 }
540 return
541}
542
Matt Rosencrantz29147f72014-06-06 12:46:01 -0700543func (__gen_c *clientStubCache) GetMethodTags(ctx _gen_context.T, method string, opts ..._gen_ipc.CallOpt) (reply []interface{}, err error) {
Matt Rosencrantzf5afcaf2014-06-02 11:31:22 -0700544 var call _gen_ipc.Call
545 if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700546 return
547 }
548 if ierr := call.Finish(&reply, &err); ierr != nil {
549 err = ierr
550 }
551 return
552}
553
554// ServerStubCache wraps a server that implements
555// CacheService and provides an object that satisfies
556// the requirements of veyron2/ipc.ReflectInvoker.
557type ServerStubCache struct {
558 service CacheService
559}
560
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -0700561func (__gen_s *ServerStubCache) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
562 // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
563 // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
564 // This will change when it is replaced with Signature().
565 switch method {
566 case "Set":
567 return []interface{}{}, nil
568 case "Get":
569 return []interface{}{}, nil
570 case "GetAsByte":
571 return []interface{}{}, nil
572 case "GetAsInt32":
573 return []interface{}{}, nil
574 case "GetAsInt64":
575 return []interface{}{}, nil
576 case "GetAsUint32":
577 return []interface{}{}, nil
578 case "GetAsUint64":
579 return []interface{}{}, nil
580 case "GetAsFloat32":
581 return []interface{}{}, nil
582 case "GetAsFloat64":
583 return []interface{}{}, nil
584 case "GetAsString":
585 return []interface{}{}, nil
586 case "GetAsBool":
587 return []interface{}{}, nil
588 case "GetAsError":
589 return []interface{}{}, nil
590 case "AsMap":
591 return []interface{}{}, nil
592 case "KeyValuePairs":
593 return []interface{}{}, nil
594 case "MostRecentSet":
595 return []interface{}{}, nil
596 case "KeyPage":
597 return []interface{}{}, nil
598 case "Size":
599 return []interface{}{}, nil
600 case "MultiGet":
601 return []interface{}{}, nil
602 default:
603 return nil, nil
604 }
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700605}
606
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -0700607func (__gen_s *ServerStubCache) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700608 result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
609 result.Methods["AsMap"] = _gen_ipc.MethodSignature{
610 InArgs: []_gen_ipc.MethodArgument{},
611 OutArgs: []_gen_ipc.MethodArgument{
612 {Name: "", Type: 68},
613 {Name: "", Type: 66},
614 },
615 }
616 result.Methods["Get"] = _gen_ipc.MethodSignature{
617 InArgs: []_gen_ipc.MethodArgument{
618 {Name: "key", Type: 3},
619 },
620 OutArgs: []_gen_ipc.MethodArgument{
621 {Name: "", Type: 65},
622 {Name: "", Type: 66},
623 },
624 }
625 result.Methods["GetAsBool"] = _gen_ipc.MethodSignature{
626 InArgs: []_gen_ipc.MethodArgument{
627 {Name: "key", Type: 3},
628 },
629 OutArgs: []_gen_ipc.MethodArgument{
630 {Name: "", Type: 2},
631 {Name: "", Type: 66},
632 },
633 }
634 result.Methods["GetAsByte"] = _gen_ipc.MethodSignature{
635 InArgs: []_gen_ipc.MethodArgument{
636 {Name: "key", Type: 3},
637 },
638 OutArgs: []_gen_ipc.MethodArgument{
639 {Name: "", Type: 67},
640 {Name: "", Type: 66},
641 },
642 }
643 result.Methods["GetAsError"] = _gen_ipc.MethodSignature{
644 InArgs: []_gen_ipc.MethodArgument{
645 {Name: "key", Type: 3},
646 },
647 OutArgs: []_gen_ipc.MethodArgument{
648 {Name: "", Type: 66},
649 {Name: "", Type: 66},
650 },
651 }
652 result.Methods["GetAsFloat32"] = _gen_ipc.MethodSignature{
653 InArgs: []_gen_ipc.MethodArgument{
654 {Name: "key", Type: 3},
655 },
656 OutArgs: []_gen_ipc.MethodArgument{
657 {Name: "", Type: 25},
658 {Name: "", Type: 66},
659 },
660 }
661 result.Methods["GetAsFloat64"] = _gen_ipc.MethodSignature{
662 InArgs: []_gen_ipc.MethodArgument{
663 {Name: "key", Type: 3},
664 },
665 OutArgs: []_gen_ipc.MethodArgument{
666 {Name: "", Type: 26},
667 {Name: "", Type: 66},
668 },
669 }
670 result.Methods["GetAsInt32"] = _gen_ipc.MethodSignature{
671 InArgs: []_gen_ipc.MethodArgument{
672 {Name: "key", Type: 3},
673 },
674 OutArgs: []_gen_ipc.MethodArgument{
675 {Name: "", Type: 36},
676 {Name: "", Type: 66},
677 },
678 }
679 result.Methods["GetAsInt64"] = _gen_ipc.MethodSignature{
680 InArgs: []_gen_ipc.MethodArgument{
681 {Name: "key", Type: 3},
682 },
683 OutArgs: []_gen_ipc.MethodArgument{
684 {Name: "", Type: 37},
685 {Name: "", Type: 66},
686 },
687 }
688 result.Methods["GetAsString"] = _gen_ipc.MethodSignature{
689 InArgs: []_gen_ipc.MethodArgument{
690 {Name: "key", Type: 3},
691 },
692 OutArgs: []_gen_ipc.MethodArgument{
693 {Name: "", Type: 3},
694 {Name: "", Type: 66},
695 },
696 }
697 result.Methods["GetAsUint32"] = _gen_ipc.MethodSignature{
698 InArgs: []_gen_ipc.MethodArgument{
699 {Name: "key", Type: 3},
700 },
701 OutArgs: []_gen_ipc.MethodArgument{
702 {Name: "", Type: 52},
703 {Name: "", Type: 66},
704 },
705 }
706 result.Methods["GetAsUint64"] = _gen_ipc.MethodSignature{
707 InArgs: []_gen_ipc.MethodArgument{
708 {Name: "key", Type: 3},
709 },
710 OutArgs: []_gen_ipc.MethodArgument{
711 {Name: "", Type: 53},
712 {Name: "", Type: 66},
713 },
714 }
715 result.Methods["KeyPage"] = _gen_ipc.MethodSignature{
716 InArgs: []_gen_ipc.MethodArgument{
717 {Name: "index", Type: 37},
718 },
719 OutArgs: []_gen_ipc.MethodArgument{
720 {Name: "", Type: 71},
721 {Name: "", Type: 66},
722 },
723 }
724 result.Methods["KeyValuePairs"] = _gen_ipc.MethodSignature{
725 InArgs: []_gen_ipc.MethodArgument{},
726 OutArgs: []_gen_ipc.MethodArgument{
727 {Name: "", Type: 70},
728 {Name: "", Type: 66},
729 },
730 }
731 result.Methods["MostRecentSet"] = _gen_ipc.MethodSignature{
732 InArgs: []_gen_ipc.MethodArgument{},
733 OutArgs: []_gen_ipc.MethodArgument{
734 {Name: "value", Type: 69},
735 {Name: "time", Type: 37},
736 {Name: "err", Type: 66},
737 },
738 }
739 result.Methods["MultiGet"] = _gen_ipc.MethodSignature{
740 InArgs: []_gen_ipc.MethodArgument{},
741 OutArgs: []_gen_ipc.MethodArgument{
742 {Name: "", Type: 66},
743 },
744 InStream: 3,
745 OutStream: 65,
746 }
747 result.Methods["Set"] = _gen_ipc.MethodSignature{
748 InArgs: []_gen_ipc.MethodArgument{
749 {Name: "key", Type: 3},
750 {Name: "value", Type: 65},
751 },
752 OutArgs: []_gen_ipc.MethodArgument{
753 {Name: "", Type: 66},
754 },
755 }
756 result.Methods["Size"] = _gen_ipc.MethodSignature{
757 InArgs: []_gen_ipc.MethodArgument{},
758 OutArgs: []_gen_ipc.MethodArgument{
759 {Name: "", Type: 37},
760 {Name: "", Type: 66},
761 },
762 }
763
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700764 result.TypeDefs = []_gen_vdlutil.Any{
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700765 _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x3, Elem: 0x41, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
766 []_gen_wiretype.FieldType{
767 _gen_wiretype.FieldType{Type: 0x3, Name: "Key"},
768 _gen_wiretype.FieldType{Type: 0x41, Name: "Value"},
769 },
Todd Wange5d67b42014-05-27 10:48:07 -0700770 "veyron/examples/wspr_sample.KeyValuePair", []string(nil)},
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700771 _gen_wiretype.SliceType{Elem: 0x45, Name: "", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x3, Len: 0xa, Name: "", Tags: []string(nil)}}
772
773 return result, nil
774}
775
Benjamin Prosnitzdcddb932014-05-27 15:55:58 -0700776func (__gen_s *ServerStubCache) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
777 if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700778 return unresolver.UnresolveStep(call)
779 }
780 if call.Server() == nil {
781 return
782 }
783 var published []string
784 if published, err = call.Server().Published(); err != nil || published == nil {
785 return
786 }
787 reply = make([]string, len(published))
788 for i, p := range published {
789 reply[i] = _gen_naming.Join(p, call.Name())
790 }
791 return
792}
793
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700794func (__gen_s *ServerStubCache) Set(call _gen_ipc.ServerCall, key string, value _gen_vdlutil.Any) (err error) {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700795 err = __gen_s.service.Set(call, key, value)
796 return
797}
798
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700799func (__gen_s *ServerStubCache) Get(call _gen_ipc.ServerCall, key string) (reply _gen_vdlutil.Any, err error) {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700800 reply, err = __gen_s.service.Get(call, key)
801 return
802}
803
804func (__gen_s *ServerStubCache) GetAsByte(call _gen_ipc.ServerCall, key string) (reply byte, err error) {
805 reply, err = __gen_s.service.GetAsByte(call, key)
806 return
807}
808
809func (__gen_s *ServerStubCache) GetAsInt32(call _gen_ipc.ServerCall, key string) (reply int32, err error) {
810 reply, err = __gen_s.service.GetAsInt32(call, key)
811 return
812}
813
814func (__gen_s *ServerStubCache) GetAsInt64(call _gen_ipc.ServerCall, key string) (reply int64, err error) {
815 reply, err = __gen_s.service.GetAsInt64(call, key)
816 return
817}
818
819func (__gen_s *ServerStubCache) GetAsUint32(call _gen_ipc.ServerCall, key string) (reply uint32, err error) {
820 reply, err = __gen_s.service.GetAsUint32(call, key)
821 return
822}
823
824func (__gen_s *ServerStubCache) GetAsUint64(call _gen_ipc.ServerCall, key string) (reply uint64, err error) {
825 reply, err = __gen_s.service.GetAsUint64(call, key)
826 return
827}
828
829func (__gen_s *ServerStubCache) GetAsFloat32(call _gen_ipc.ServerCall, key string) (reply float32, err error) {
830 reply, err = __gen_s.service.GetAsFloat32(call, key)
831 return
832}
833
834func (__gen_s *ServerStubCache) GetAsFloat64(call _gen_ipc.ServerCall, key string) (reply float64, err error) {
835 reply, err = __gen_s.service.GetAsFloat64(call, key)
836 return
837}
838
839func (__gen_s *ServerStubCache) GetAsString(call _gen_ipc.ServerCall, key string) (reply string, err error) {
840 reply, err = __gen_s.service.GetAsString(call, key)
841 return
842}
843
844func (__gen_s *ServerStubCache) GetAsBool(call _gen_ipc.ServerCall, key string) (reply bool, err error) {
845 reply, err = __gen_s.service.GetAsBool(call, key)
846 return
847}
848
849func (__gen_s *ServerStubCache) GetAsError(call _gen_ipc.ServerCall, key string) (reply error, err error) {
850 reply, err = __gen_s.service.GetAsError(call, key)
851 return
852}
853
Todd Wang0ecdd7a2014-07-14 16:24:38 -0700854func (__gen_s *ServerStubCache) AsMap(call _gen_ipc.ServerCall) (reply map[string]_gen_vdlutil.Any, err error) {
Jiri Simsa5293dcb2014-05-10 09:56:38 -0700855 reply, err = __gen_s.service.AsMap(call)
856 return
857}
858
859func (__gen_s *ServerStubCache) KeyValuePairs(call _gen_ipc.ServerCall) (reply []KeyValuePair, err error) {
860 reply, err = __gen_s.service.KeyValuePairs(call)
861 return
862}
863
864func (__gen_s *ServerStubCache) MostRecentSet(call _gen_ipc.ServerCall) (value KeyValuePair, time int64, err error) {
865 value, time, err = __gen_s.service.MostRecentSet(call)
866 return
867}
868
869func (__gen_s *ServerStubCache) KeyPage(call _gen_ipc.ServerCall, index int64) (reply [10]string, err error) {
870 reply, err = __gen_s.service.KeyPage(call, index)
871 return
872}
873
874func (__gen_s *ServerStubCache) Size(call _gen_ipc.ServerCall) (reply int64, err error) {
875 reply, err = __gen_s.service.Size(call)
876 return
877}
878
879func (__gen_s *ServerStubCache) MultiGet(call _gen_ipc.ServerCall) (err error) {
880 stream := &implCacheServiceMultiGetStream{serverCall: call}
881 err = __gen_s.service.MultiGet(call, stream)
882 return
883}