Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
a4f12a18
Commit
a4f12a18
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
97ddfc96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
t/neo/marshal.go
t/neo/marshal.go
+19
-0
t/neo/protogen.go
t/neo/protogen.go
+1
-0
No files found.
t/neo/marshal.go
View file @
a4f12a18
...
...
@@ -13,6 +13,7 @@ func (p *Address) NEODecode(data []byte) (int, error) {
p
.
Port
=
BigEndian
.
Uint16
(
data
[
0
:
])
return
2
/* + TODO variable part */
,
nil
}
func
(
p
*
NodeInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
NodeType
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
{
...
...
@@ -30,11 +31,13 @@ func (p *NodeInfo) NEODecode(data []byte) (int, error) {
p
.
IdTimestamp
=
float64_NEODecode
(
data
[
10
:
])
return
18
/* + TODO variable part */
,
nil
}
func
(
p
*
CellInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
UUID
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
p
.
CellState
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
return
8
/* + TODO variable part */
,
nil
}
func
(
p
*
RowInfo
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Offset
=
BigEndian
.
Uint32
(
data
[
0
:
])
{
...
...
@@ -49,6 +52,7 @@ func (p *RowInfo) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
Notify
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
{
l
:=
BigEndian
.
Uint32
(
data
[
0
:
])
...
...
@@ -61,6 +65,7 @@ func (p *Notify) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
Error
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
Code
=
BigEndian
.
Uint32
(
data
[
0
:
])
{
...
...
@@ -74,12 +79,15 @@ func (p *Error) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
Ping
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
CloseClient
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
RequestIdentification
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
ProtocolVersion
=
BigEndian
.
Uint32
(
data
[
0
:
])
p
.
NodeType
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
...
...
@@ -106,6 +114,7 @@ func (p *RequestIdentification) NEODecode(data []byte) (int, error) {
p
.
IdTimestamp
=
float64_NEODecode
(
data
[
0
:
])
return
8
/* + TODO variable part */
,
nil
}
func
(
p
*
AcceptIdentification
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
NodeType
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
p
.
MyUUID
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
...
...
@@ -146,39 +155,49 @@ func (p *AcceptIdentification) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
PrimaryMaster
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerPrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
PrimaryUUID
=
int32
(
BigEndian
.
Uint32
(
data
[
0
:
]))
return
4
/* + TODO variable part */
,
nil
}
func
(
p
*
AnnouncePrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
ReelectPrimary
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
Recovery
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerRecovery
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
PTid
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
BackupTID
=
BigEndian
.
Uint64
(
data
[
8
:
])
p
.
TruncateTID
=
BigEndian
.
Uint64
(
data
[
16
:
])
return
24
/* + TODO variable part */
,
nil
}
func
(
p
*
LastIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerLastIDs
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
LastOID
=
BigEndian
.
Uint64
(
data
[
0
:
])
p
.
LastTID
=
BigEndian
.
Uint64
(
data
[
8
:
])
return
16
/* + TODO variable part */
,
nil
}
func
(
p
*
PartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
AnswerPartitionTable
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
PTid
=
BigEndian
.
Uint64
(
data
[
0
:
])
{
...
...
t/neo/protogen.go
View file @
a4f12a18
...
...
@@ -105,6 +105,7 @@ func main() {
//ast.Print(fset, t)
buf
.
WriteString
(
gendecode
(
typespec
))
buf
.
WriteString
(
"
\n
"
)
}
}
...
...
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