Documentation
¶
Index ¶
- type Client
- type DRPCmd
- type DRPCmdParams
- type DRPEndpointMethod
- type DRPPacket
- type DRPPacketIn
- type DRPReply
- type Endpoint
- func (e *Endpoint) AddReplyHandler() string
- func (e *Endpoint) CloseHandler()
- func (e *Endpoint) DeleteReplyHandler()
- func (e *Endpoint) ErrorHandler()
- func (e *Endpoint) GetCmds(DRPCmdParams, *websocket.Conn, *string) interface{}
- func (e *Endpoint) GetToken() string
- func (e *Endpoint) Init()
- func (e *Endpoint) OpenHandler()
- func (e *Endpoint) ProcessCmd(wsConn *websocket.Conn, msgIn DRPPacketIn)
- func (e *Endpoint) ProcessReply(msgIn DRPPacketIn)
- func (e *Endpoint) ReceiveMessage(wsConn *websocket.Conn, msgIn DRPPacketIn)
- func (e *Endpoint) RegisterCmd(methodName string, method DRPEndpointMethod)
- func (e *Endpoint) SendCmd(methodName string, cmdParams DRPCmdParams) string
- func (e *Endpoint) SendCmdAwait(cmdName string, cmdParams DRPCmdParams) DRPPacketIn
- func (e *Endpoint) SendCmdSubscribe(topicName string, scope string, returnChan chan DRPPacketIn)
- func (e *Endpoint) SendReply(wsConn *websocket.Conn, replyToken *string, returnStatus int, ...)
- func (e *Endpoint) SendStream()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DRPCmd ¶
type DRPCmd struct { DRPPacket Method *string `json:"method"` Params DRPCmdParams `json:"params"` Token *string `json:"token"` }
type DRPEndpointMethod ¶
type DRPEndpointMethod func(DRPCmdParams, *websocket.Conn, *string) interface{}
DRPEndpointMethod - DRP Endpoint method
type DRPPacketIn ¶
type DRPPacketIn struct { Type string `json:"type"` Method *string `json:"method"` Params DRPCmdParams `json:"params"` Token *string `json:"token"` Status int `json:"status"` Payload interface{} `json:"payload"` }
DRPPacketIn Message in; could be a Cmd or Reply
type Endpoint ¶
type Endpoint struct { EndpointCmds map[string]DRPEndpointMethod ReplyHandlerQueue map[string](chan DRPPacketIn) TokenNum int // contains filtered or unexported fields }
Endpoint - DRP endpoint
func (*Endpoint) AddReplyHandler ¶
func (*Endpoint) CloseHandler ¶
func (e *Endpoint) CloseHandler()
func (*Endpoint) DeleteReplyHandler ¶
func (e *Endpoint) DeleteReplyHandler()
func (*Endpoint) ErrorHandler ¶
func (e *Endpoint) ErrorHandler()
func (*Endpoint) GetCmds ¶
func (e *Endpoint) GetCmds(DRPCmdParams, *websocket.Conn, *string) interface{}
func (*Endpoint) OpenHandler ¶
func (e *Endpoint) OpenHandler()
func (*Endpoint) ProcessCmd ¶
func (e *Endpoint) ProcessCmd(wsConn *websocket.Conn, msgIn DRPPacketIn)
func (*Endpoint) ProcessReply ¶
func (e *Endpoint) ProcessReply(msgIn DRPPacketIn)
func (*Endpoint) ReceiveMessage ¶
func (e *Endpoint) ReceiveMessage(wsConn *websocket.Conn, msgIn DRPPacketIn)
func (*Endpoint) RegisterCmd ¶
func (e *Endpoint) RegisterCmd(methodName string, method DRPEndpointMethod)
func (*Endpoint) SendCmd ¶
func (e *Endpoint) SendCmd(methodName string, cmdParams DRPCmdParams) string
SendCmd
func (*Endpoint) SendCmdAwait ¶
func (e *Endpoint) SendCmdAwait(cmdName string, cmdParams DRPCmdParams) DRPPacketIn
SendCmdAwait
func (*Endpoint) SendCmdSubscribe ¶
func (e *Endpoint) SendCmdSubscribe(topicName string, scope string, returnChan chan DRPPacketIn)
SendCmdSubscribe
func (*Endpoint) SendStream ¶
func (e *Endpoint) SendStream()
Click to show internal directories.
Click to hide internal directories.