Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
1c39bd22
Commit
1c39bd22
authored
Jul 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
2933330b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
go/zodb/storage/zeo/proto.go
go/zodb/storage/zeo/proto.go
+2
-2
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+3
-3
No files found.
go/zodb/storage/zeo/proto.go
View file @
1c39bd22
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
// See https://www.nexedi.com/licensing for rationale and options.
// See https://www.nexedi.com/licensing for rationale and options.
package
zeo
package
zeo
// Protocol for exchang
ing
ZEO messages.
// Protocol for exchang
ed
ZEO messages.
// On the wire messages are encoded via either pickles or msgpack.
// On the wire messages are encoded via either pickles or msgpack.
// Each message is wrapped into packet with be32 header of whole packet size.
// Each message is wrapped into packet with be32 header of whole packet size.
// See https://github.com/zopefoundation/ZEO/blob/5.2.1-20-gcb26281d/doc/protocol.rst for details.
// See https://github.com/zopefoundation/ZEO/blob/5.2.1-20-gcb26281d/doc/protocol.rst for details.
...
@@ -125,7 +125,7 @@ func pktDecodeZ(pkb *pktBuf) (msg, error) {
...
@@ -125,7 +125,7 @@ func pktDecodeZ(pkb *pktBuf) (msg, error) {
return
m
,
err
return
m
,
err
}
}
tpkt
,
ok
:=
xpkt
.
(
pickle
.
Tuple
)
// XXX also list? -> Z
.asTuple(xpkt)
tpkt
,
ok
:=
encoding
(
'Z'
)
.
asTuple
(
xpkt
)
if
!
ok
{
if
!
ok
{
return
m
,
derrf
(
"got %T; expected tuple"
,
xpkt
)
return
m
,
derrf
(
"got %T; expected tuple"
,
xpkt
)
}
}
...
...
go/zodb/storage/zeo/zeo.go
View file @
1c39bd22
...
@@ -200,7 +200,7 @@ type rpc struct {
...
@@ -200,7 +200,7 @@ type rpc struct {
// rpcExcept represents generic exception
// rpcExcept represents generic exception
type
rpcExcept
struct
{
type
rpcExcept
struct
{
exc
string
exc
string
argv
[]
interface
{}
argv
tuple
}
}
func
(
r
*
rpcExcept
)
Error
()
string
{
func
(
r
*
rpcExcept
)
Error
()
string
{
...
@@ -282,7 +282,7 @@ func (r rpc) zeo5Error(arg interface{}) error {
...
@@ -282,7 +282,7 @@ func (r rpc) zeo5Error(arg interface{}) error {
//
//
// nil is returned if arg does not represent an exception.
// nil is returned if arg does not represent an exception.
func
(
r
rpc
)
zeo4Error
(
arg
interface
{})
error
{
func
(
r
rpc
)
zeo4Error
(
arg
interface
{})
error
{
// XXX check r.zl.encoding == 'Z' before using pickles?
// XXX check r.zl.encoding == 'Z' before using pickles?
XXX
// (exc_class, exc_inst), e.g.
// (exc_class, exc_inst), e.g.
// ogórek.Tuple{
// ogórek.Tuple{
...
@@ -297,7 +297,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
...
@@ -297,7 +297,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
// }
// }
// }
// }
// }
// }
targ
,
ok
:=
arg
.
(
pickle
.
Tuple
)
targ
,
ok
:=
arg
.
(
pickle
.
Tuple
)
// XXX -> asTuple
if
!
ok
||
len
(
targ
)
!=
2
{
if
!
ok
||
len
(
targ
)
!=
2
{
return
nil
return
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment