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 FunctionError(requestId value.Number, format string, args ...interface{}) value.Map
- func FunctionResult(requestId value.Number, result value.Value) value.Map
- func NewServingClient(clientId int64, conn valuerpc.MsgConn, functionMap *sync.Map, ...) *servingClient
- func NewServingRequest(ft functionType, requestId value.Number) *servingRequest
- func StreamEnd(requestId value.Number, val value.Value) value.Map
- func StreamReady(requestId value.Number) value.Map
- func StreamValue(requestId value.Number, val value.Value) value.Map
- 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 Chat
- type Function
- type IncomingStream
- type OutgoingStream
- type ParamDef
- type ParamsDef
- type Server
- type TypeDef
- type VoidDef
Constants ¶
This section is empty.
Variables ¶
View Source
var Any = AnyDef{}
View Source
var ErrFunctionAlreadyExist = errors.New("function already exist")
View Source
var IncomingQueueCap = 4096
View Source
var OutgoingQueueCap = 4096
View Source
var Void = VoidDef{}
Functions ¶
func FunctionError ¶
func NewServingClient ¶
func NewServingRequest ¶
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 ParamsDef ¶
type ParamsDef struct {
Map []ParamDef
}
func (ParamsDef) UserTypeDef ¶
func (t ParamsDef) UserTypeDef()
type Server ¶
type Server interface {
AddFunction(name string, args TypeDef, res TypeDef, cb Function) error
// GET for client
AddOutgoingStream(name string, args TypeDef, cb OutgoingStream) error
// PUT for client
AddIncomingStream(name string, args TypeDef, cb IncomingStream) error
// Dual channel chat
AddChat(name string, args TypeDef, cb Chat) error
Run() error
Close() error
}
func NewDevelopmentServer ¶
Click to show internal directories.
Click to hide internal directories.