Documentation ¶
Overview ¶
* * Copyright 2020-present Arpabet Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
- Variables
- func NewHandshakeRequest(clientId int64) value.Map
- func NewHandshakeResponse() value.Map
- func ValidMagicAndVersion(req value.Map) bool
- func Verify(args value.Value, def TypeDef) bool
- func VerifyArg(arg value.Value, def ArgDef) bool
- func VerifyArgs(args value.Value, argsDef ArgsDef) bool
- func VerifyParam(value value.Value, def ParamDef) bool
- func VerifyParams(args value.Value, paramsDef ParamsDef) bool
- type AnyDef
- type ArgDef
- type ArgsDef
- type MessageType
- type MsgConn
- type ParamDef
- type ParamsDef
- type TypeDef
- type VoidDef
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Any = AnyDef{} Void = VoidDef{} Bool = Arg(value.BOOL, true) BoolOpt = Arg(value.BOOL, false) Number = Arg(value.NUMBER, true) NumberOpt = Arg(value.NUMBER, false) String = Arg(value.STRING, true) StringOpt = Arg(value.STRING, false) )
View Source
var ArgumentsField = "args" // allow multiple args if List value in function call
View Source
var ClientIdField = "cid"
View Source
var ErrorField = "err"
View Source
var FunctionNameField = "fn"
View Source
var HandshakeRequestId = int64(-1)
View Source
var Magic = "vRPC"
View Source
var MagicField = "m"
View Source
var MessageTypeField = "t"
View Source
var RequestIdField = "rid"
View Source
var ResultField = "res" // allow multiple results if List in function call
View Source
var TimeoutField = "sla"
View Source
var ValueField = "val" // streaming value field
View Source
var Version = 1.0
View Source
var VersionField = "v"
Functions ¶
func NewHandshakeRequest ¶
func NewHandshakeResponse ¶
func ValidMagicAndVersion ¶
Types ¶
type ArgDef ¶
func (ArgDef) UserTypeDef ¶
func (t ArgDef) UserTypeDef()
type ArgsDef ¶
type ArgsDef struct {
List []ArgDef
}
func (ArgsDef) UserTypeDef ¶
func (t ArgsDef) UserTypeDef()
type MessageType ¶
type MessageType int64
const ( HandshakeRequest MessageType = iota HandshakeResponse FunctionRequest FunctionResponse GetStreamRequest PutStreamRequest ChatRequest ErrorResponse StreamReady StreamValue StreamEnd CancelRequest ThrottleIncrease ThrottleDecrease )
func (MessageType) Long ¶
func (t MessageType) Long() value.Number
type MsgConn ¶
type MsgConn interface { ReadMessage() (value.Map, error) WriteMessage(msg value.Map) error Close() error Conn() net.Conn }
func NewMsgConn ¶
Click to show internal directories.
Click to hide internal directories.