| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| var vdl = require('vanadium').vdl; |
| var makeError = require('vanadium').verror.makeError; |
| var actions = require('vanadium').verror.actions; |
| var canonicalize = require('vanadium').vdl.canonicalize; |
| |
| |
| |
| |
| |
| var access = require('./../../security/access'); |
| |
| module.exports = {}; |
| |
| |
| |
| // Types: |
| var _typeChange = new vdl.Type(); |
| var _typeGlobRequest = new vdl.Type(); |
| var _typeResumeMarker = new vdl.Type(); |
| _typeChange.kind = vdl.kind.STRUCT; |
| _typeChange.name = "v.io/v23/services/watch.Change"; |
| _typeChange.fields = [{name: "Name", type: vdl.types.STRING}, {name: "State", type: vdl.types.INT32}, {name: "Value", type: vdl.types.ANY}, {name: "ResumeMarker", type: _typeResumeMarker}, {name: "Continued", type: vdl.types.BOOL}]; |
| _typeGlobRequest.kind = vdl.kind.STRUCT; |
| _typeGlobRequest.name = "v.io/v23/services/watch.GlobRequest"; |
| _typeGlobRequest.fields = [{name: "Pattern", type: vdl.types.STRING}, {name: "ResumeMarker", type: _typeResumeMarker}]; |
| _typeResumeMarker.kind = vdl.kind.LIST; |
| _typeResumeMarker.name = "v.io/v23/services/watch.ResumeMarker"; |
| _typeResumeMarker.elem = vdl.types.BYTE; |
| _typeChange.freeze(); |
| _typeGlobRequest.freeze(); |
| _typeResumeMarker.freeze(); |
| module.exports.Change = (vdl.registry.lookupOrCreateConstructor(_typeChange)); |
| module.exports.GlobRequest = (vdl.registry.lookupOrCreateConstructor(_typeGlobRequest)); |
| module.exports.ResumeMarker = (vdl.registry.lookupOrCreateConstructor(_typeResumeMarker)); |
| |
| |
| |
| |
| // Consts: |
| |
| module.exports.Exists = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(vdl.types.INT32))(0, true), vdl.types.INT32); |
| |
| module.exports.DoesNotExist = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(vdl.types.INT32))(1, true), vdl.types.INT32); |
| |
| module.exports.InitialStateSkipped = canonicalize.reduce(new (vdl.registry.lookupOrCreateConstructor(vdl.types.INT32))(2, true), vdl.types.INT32); |
| |
| |
| |
| // Errors: |
| |
| module.exports.UnknownResumeMarkerError = makeError('v.io/v23/services/watch.UnknownResumeMarker', actions.NO_RETRY, { |
| 'en': '{1:}{2:} unknown resume marker {_}', |
| }, [ |
| ]); |
| |
| |
| |
| |
| // Services: |
| |
| |
| |
| function GlobWatcher(){} |
| module.exports.GlobWatcher = GlobWatcher; |
| |
| |
| |
| GlobWatcher.prototype.watchGlob = function(ctx, serverCall, req) { |
| throw new Error('Method WatchGlob not implemented'); |
| }; |
| |
| |
| |
| GlobWatcher.prototype._serviceDescription = { |
| name: 'GlobWatcher', |
| pkgPath: 'v.io/v23/services/watch', |
| doc: "// GlobWatcher allows a client to receive updates for changes to objects\n// that match a pattern. See the package comments for details.", |
| embeds: [], |
| methods: [ |
| |
| |
| { |
| name: 'WatchGlob', |
| doc: "// WatchGlob returns a stream of changes that match a pattern.", |
| inArgs: [{ |
| name: 'req', |
| doc: "", |
| type: _typeGlobRequest |
| }, |
| ], |
| outArgs: [], |
| inStream: null, |
| outStream: { |
| name: '', |
| doc: '', |
| type: _typeChange |
| }, |
| tags: [canonicalize.reduce(new access.Tag("Resolve", true), new access.Tag()._type), ] |
| }, |
| |
| ] |
| }; |
| |
| |
| |
| |
| |