Bump reva deps (#8412)
* bump dependencies Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * bump reva and add config options Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> --------- Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
+7
-5
@@ -10,22 +10,24 @@ import (
|
||||
)
|
||||
|
||||
type clientCodec struct {
|
||||
dec *json.Decoder // for reading JSON values
|
||||
enc *json.Encoder // for writing JSON values
|
||||
c io.Closer
|
||||
|
||||
// temporary work space
|
||||
req clientRequest
|
||||
resp clientResponse
|
||||
|
||||
sync.Mutex
|
||||
c io.Closer
|
||||
|
||||
dec *json.Decoder // for reading JSON values
|
||||
enc *json.Encoder // for writing JSON values
|
||||
pending map[interface{}]string
|
||||
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
type clientRequest struct {
|
||||
Method string `json:"method"`
|
||||
Params [1]interface{} `json:"params"`
|
||||
ID interface{} `json:"id"`
|
||||
Method string `json:"method"`
|
||||
}
|
||||
|
||||
type clientResponse struct {
|
||||
|
||||
+5
-5
@@ -11,11 +11,11 @@ import (
|
||||
)
|
||||
|
||||
type jsonCodec struct {
|
||||
buf *bytes.Buffer
|
||||
mt codec.MessageType
|
||||
rwc io.ReadWriteCloser
|
||||
buf *bytes.Buffer
|
||||
c *clientCodec
|
||||
s *serverCodec
|
||||
mt codec.MessageType
|
||||
}
|
||||
|
||||
func (j *jsonCodec) Close() error {
|
||||
@@ -41,7 +41,7 @@ func (j *jsonCodec) Write(m *codec.Message, b interface{}) error {
|
||||
_, err = j.rwc.Write(data)
|
||||
return err
|
||||
default:
|
||||
return fmt.Errorf("Unrecognised message type: %v", m.Type)
|
||||
return fmt.Errorf("Unrecognized message type: %v", m.Type)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func (j *jsonCodec) ReadHeader(m *codec.Message, mt codec.MessageType) error {
|
||||
_, err := io.Copy(j.buf, j.rwc)
|
||||
return err
|
||||
default:
|
||||
return fmt.Errorf("Unrecognised message type: %v", mt)
|
||||
return fmt.Errorf("Unrecognized message type: %v", mt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ func (j *jsonCodec) ReadBody(b interface{}) error {
|
||||
return json.Unmarshal(j.buf.Bytes(), b)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("Unrecognised message type: %v", j.mt)
|
||||
return fmt.Errorf("Unrecognized message type: %v", j.mt)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ type serverCodec struct {
|
||||
}
|
||||
|
||||
type serverRequest struct {
|
||||
Method string `json:"method"`
|
||||
Params *json.RawMessage `json:"params"`
|
||||
ID interface{} `json:"id"`
|
||||
Params *json.RawMessage `json:"params"`
|
||||
Method string `json:"method"`
|
||||
}
|
||||
|
||||
type serverResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user