aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/types.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-04-06 14:56:41 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-04-25 17:13:22 +0800
commit37e3f561f15cbedf10c01847e58a079f9b86bf6f (patch)
treed7cdc3e8a5b74261a3359f6029e927cca0fc738b /rpc/types.go
parentba3bcd16a6d99bc0e58516556df8e96b730c2d60 (diff)
downloaddexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar.gz
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar.bz2
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar.lz
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar.xz
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.tar.zst
dexon-37e3f561f15cbedf10c01847e58a079f9b86bf6f.zip
rpc: support subscriptions under custom namespaces
Diffstat (limited to 'rpc/types.go')
-rw-r--r--rpc/types.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/rpc/types.go b/rpc/types.go
index d29281a4a..a7b8c9788 100644
--- a/rpc/types.go
+++ b/rpc/types.go
@@ -104,17 +104,17 @@ type ServerCodec interface {
// Read next request
ReadRequestHeaders() ([]rpcRequest, bool, Error)
// Parse request argument to the given types
- ParseRequestArguments([]reflect.Type, interface{}) ([]reflect.Value, Error)
+ ParseRequestArguments(argTypes []reflect.Type, params interface{}) ([]reflect.Value, Error)
// Assemble success response, expects response id and payload
- CreateResponse(interface{}, interface{}) interface{}
+ CreateResponse(id interface{}, reply interface{}) interface{}
// Assemble error response, expects response id and error
- CreateErrorResponse(interface{}, Error) interface{}
+ CreateErrorResponse(id interface{}, err Error) interface{}
// Assemble error response with extra information about the error through info
CreateErrorResponseWithInfo(id interface{}, err Error, info interface{}) interface{}
// Create notification response
- CreateNotification(string, interface{}) interface{}
+ CreateNotification(id, namespace string, event interface{}) interface{}
// Write msg to client.
- Write(interface{}) error
+ Write(msg interface{}) error
// Close underlying data stream
Close()
// Closed when underlying connection is closed