| // 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. |
| // Source: protocol.vdl |
| |
| package rpc |
| |
| import ( |
| // VDL system imports |
| "v.io/v23/vdl" |
| |
| // VDL user imports |
| "v.io/v23/security" |
| "v.io/v23/vdlroot/time" |
| "v.io/v23/vtrace" |
| ) |
| |
| // Request describes the request header sent by the client to the server. A |
| // non-zero request header is sent at the beginning of the RPC call, followed by |
| // the positional args. Thereafter a zero request header is sent before each |
| // streaming arg, terminated by a non-zero request header with EndStreamArgs set |
| // to true. |
| type Request struct { |
| // Suffix of the name used to identify the object hosting the service. |
| Suffix string |
| // Method to invoke on the service. |
| Method string |
| // NumPosArgs is the number of positional arguments, which follow this message |
| // (and any blessings) on the request stream. |
| NumPosArgs uint64 |
| // EndStreamArgs is true iff no more streaming arguments will be sent. No |
| // more data will be sent on the request stream. |
| // |
| // NOTE(bprosnitz): We can support multiple stream values per request (+response) header |
| // efficiently by adding a NumExtraStreamArgs (+NumExtraStreamResults to response) field |
| // that is the uint64 (number of stream args to send) - 1. The request is then zero when |
| // exactly one streaming arg is sent. Since the request and response headers are small, |
| // this is only likely necessary for frequently streaming small values. |
| // See implementation in CL: 3913 |
| EndStreamArgs bool |
| // Deadline after which the request should be cancelled. This is a hint to |
| // the server, to avoid wasted work. |
| Deadline time.Deadline |
| // GrantedBlessings are blessings bound to the principal running the server, |
| // provided by the client. |
| GrantedBlessings security.Blessings |
| // TraceRequest maintains the vtrace context between clients and servers |
| // and specifies additional parameters that control how tracing behaves. |
| TraceRequest vtrace.Request |
| // Language indicates the language of the instegator of the RPC. |
| // By convention it should be an IETF language tag: |
| // http://en.wikipedia.org/wiki/IETF_language_tag |
| Language string |
| } |
| |
| func (Request) __VDLReflect(struct { |
| Name string `vdl:"v.io/v23/rpc.Request"` |
| }) { |
| } |
| |
| // Response describes the response header sent by the server to the client. A |
| // zero response header is sent before each streaming arg. Thereafter a |
| // non-zero response header is sent at the end of the RPC call, right before |
| // the positional results. |
| type Response struct { |
| // Error in processing the RPC at the server. Implies EndStreamResults. |
| Error error |
| // EndStreamResults is true iff no more streaming results will be sent; the |
| // remainder of the stream consists of NumPosResults positional results. |
| EndStreamResults bool |
| // NumPosResults is the number of positional results, which immediately follow |
| // on the response stream. After these results, no further data will be sent |
| // on the response stream. |
| NumPosResults uint64 |
| // TraceResponse maintains the vtrace context between clients and servers. |
| // In some cases trace data will be included in this response as well. |
| TraceResponse vtrace.Response |
| // AckBlessings is true if the server successfully recevied the client's |
| // blessings and stored them in the server's blessings cache. |
| AckBlessings bool |
| } |
| |
| func (Response) __VDLReflect(struct { |
| Name string `vdl:"v.io/v23/rpc.Response"` |
| }) { |
| } |
| |
| func init() { |
| vdl.Register((*Request)(nil)) |
| vdl.Register((*Response)(nil)) |
| } |
| |
| // TODO(toddw): Rename GlobMethod to ReservedGlob. |
| const GlobMethod = "__Glob" |
| |
| const ReservedSignature = "__Signature" |
| |
| const ReservedMethodSignature = "__MethodSignature" |