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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
547a6fa9
Commit
547a6fa9
authored
Jul 17, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bca096a5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
153 deletions
+130
-153
go/neo/connection.go
go/neo/connection.go
+4
-6
go/neo/proto-marshal.go
go/neo/proto-marshal.go
+92
-92
go/neo/protogen.go
go/neo/protogen.go
+1
-1
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+18
-10
go/neo/ztrace.go
go/neo/ztrace.go
+12
-38
go/neo/ztrace.s
go/neo/ztrace.s
+0
-2
go/xcommon/xtesting/xtesting.go
go/xcommon/xtesting/xtesting.go
+3
-4
No files found.
go/neo/connection.go
View file @
547a6fa9
...
@@ -736,11 +736,9 @@ func (c *Conn) err(op string, e error) error {
...
@@ -736,11 +736,9 @@ func (c *Conn) err(op string, e error) error {
// ---- exchange of messages ----
// ---- exchange of messages ----
//trace:event traceConnRecv(c *Conn /*aaa*/, msg Msg)
//trace:event traceConnRecv(c *Conn, msg Msg)
//trace:event traceConnSend(c *Conn, msg Msg) // XXX -> traceConnSendPre ?
//trace:event traceConnSendPre(c *Conn, msg Msg)
// XXX do we also need traceConnSend?
//XXX temp
//trace:import "lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet"
// Recv receives message
// Recv receives message
// it receives packet and decodes message from it
// it receives packet and decodes message from it
...
@@ -775,7 +773,7 @@ func (c *Conn) Recv() (Msg, error) {
...
@@ -775,7 +773,7 @@ func (c *Conn) Recv() (Msg, error) {
// Send sends message
// Send sends message
// it encodes message into packet and sends it
// it encodes message into packet and sends it
func
(
c
*
Conn
)
Send
(
msg
Msg
)
error
{
func
(
c
*
Conn
)
Send
(
msg
Msg
)
error
{
traceConnSend
(
c
,
msg
)
traceConnSend
Pre
(
c
,
msg
)
l
:=
msg
.
NEOMsgEncodedLen
()
l
:=
msg
.
NEOMsgEncodedLen
()
buf
:=
PktBuf
{
make
([]
byte
,
PktHeadLen
+
l
)}
// TODO -> freelist
buf
:=
PktBuf
{
make
([]
byte
,
PktHeadLen
+
l
)}
// TODO -> freelist
...
...
go/neo/proto-marshal.go
View file @
547a6fa9
...
@@ -14,7 +14,7 @@ import (
...
@@ -14,7 +14,7 @@ import (
// 0. Address
// 0. Address
func
(
_
*
Address
)
NEOMsgCode
()
uint16
{
func
(
*
Address
)
NEOMsgCode
()
uint16
{
return
0
return
0
}
}
...
@@ -57,7 +57,7 @@ overflow:
...
@@ -57,7 +57,7 @@ overflow:
// 1. NodeInfo
// 1. NodeInfo
func
(
_
*
NodeInfo
)
NEOMsgCode
()
uint16
{
func
(
*
NodeInfo
)
NEOMsgCode
()
uint16
{
return
1
return
1
}
}
...
@@ -108,7 +108,7 @@ overflow:
...
@@ -108,7 +108,7 @@ overflow:
// 2. CellInfo
// 2. CellInfo
func
(
_
*
CellInfo
)
NEOMsgCode
()
uint16
{
func
(
*
CellInfo
)
NEOMsgCode
()
uint16
{
return
2
return
2
}
}
...
@@ -135,7 +135,7 @@ overflow:
...
@@ -135,7 +135,7 @@ overflow:
// 3. RowInfo
// 3. RowInfo
func
(
_
*
RowInfo
)
NEOMsgCode
()
uint16
{
func
(
*
RowInfo
)
NEOMsgCode
()
uint16
{
return
3
return
3
}
}
...
@@ -187,7 +187,7 @@ overflow:
...
@@ -187,7 +187,7 @@ overflow:
// 4. Error
// 4. Error
func
(
_
*
Error
)
NEOMsgCode
()
uint16
{
func
(
*
Error
)
NEOMsgCode
()
uint16
{
return
4
return
4
}
}
...
@@ -230,7 +230,7 @@ overflow:
...
@@ -230,7 +230,7 @@ overflow:
// 5. Ping
// 5. Ping
func
(
_
*
Ping
)
NEOMsgCode
()
uint16
{
func
(
*
Ping
)
NEOMsgCode
()
uint16
{
return
5
return
5
}
}
...
@@ -247,7 +247,7 @@ func (p *Ping) NEOMsgDecode(data []byte) (int, error) {
...
@@ -247,7 +247,7 @@ func (p *Ping) NEOMsgDecode(data []byte) (int, error) {
// 6. CloseClient
// 6. CloseClient
func
(
_
*
CloseClient
)
NEOMsgCode
()
uint16
{
func
(
*
CloseClient
)
NEOMsgCode
()
uint16
{
return
6
return
6
}
}
...
@@ -264,7 +264,7 @@ func (p *CloseClient) NEOMsgDecode(data []byte) (int, error) {
...
@@ -264,7 +264,7 @@ func (p *CloseClient) NEOMsgDecode(data []byte) (int, error) {
// 7. RequestIdentification
// 7. RequestIdentification
func
(
_
*
RequestIdentification
)
NEOMsgCode
()
uint16
{
func
(
*
RequestIdentification
)
NEOMsgCode
()
uint16
{
return
7
return
7
}
}
...
@@ -330,7 +330,7 @@ overflow:
...
@@ -330,7 +330,7 @@ overflow:
// 8. AcceptIdentification
// 8. AcceptIdentification
func
(
_
*
AcceptIdentification
)
NEOMsgCode
()
uint16
{
func
(
*
AcceptIdentification
)
NEOMsgCode
()
uint16
{
return
8
return
8
}
}
...
@@ -363,7 +363,7 @@ overflow:
...
@@ -363,7 +363,7 @@ overflow:
// 9. PrimaryMaster
// 9. PrimaryMaster
func
(
_
*
PrimaryMaster
)
NEOMsgCode
()
uint16
{
func
(
*
PrimaryMaster
)
NEOMsgCode
()
uint16
{
return
9
return
9
}
}
...
@@ -380,7 +380,7 @@ func (p *PrimaryMaster) NEOMsgDecode(data []byte) (int, error) {
...
@@ -380,7 +380,7 @@ func (p *PrimaryMaster) NEOMsgDecode(data []byte) (int, error) {
// 10. AnswerPrimary
// 10. AnswerPrimary
func
(
_
*
AnswerPrimary
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerPrimary
)
NEOMsgCode
()
uint16
{
return
10
return
10
}
}
...
@@ -405,7 +405,7 @@ overflow:
...
@@ -405,7 +405,7 @@ overflow:
// 11. NotPrimaryMaster
// 11. NotPrimaryMaster
func
(
_
*
NotPrimaryMaster
)
NEOMsgCode
()
uint16
{
func
(
*
NotPrimaryMaster
)
NEOMsgCode
()
uint16
{
return
11
return
11
}
}
...
@@ -477,7 +477,7 @@ overflow:
...
@@ -477,7 +477,7 @@ overflow:
// 12. Recovery
// 12. Recovery
func
(
_
*
Recovery
)
NEOMsgCode
()
uint16
{
func
(
*
Recovery
)
NEOMsgCode
()
uint16
{
return
12
return
12
}
}
...
@@ -494,7 +494,7 @@ func (p *Recovery) NEOMsgDecode(data []byte) (int, error) {
...
@@ -494,7 +494,7 @@ func (p *Recovery) NEOMsgDecode(data []byte) (int, error) {
// 13. AnswerRecovery
// 13. AnswerRecovery
func
(
_
*
AnswerRecovery
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerRecovery
)
NEOMsgCode
()
uint16
{
return
13
return
13
}
}
...
@@ -523,7 +523,7 @@ overflow:
...
@@ -523,7 +523,7 @@ overflow:
// 14. LastIDs
// 14. LastIDs
func
(
_
*
LastIDs
)
NEOMsgCode
()
uint16
{
func
(
*
LastIDs
)
NEOMsgCode
()
uint16
{
return
14
return
14
}
}
...
@@ -540,7 +540,7 @@ func (p *LastIDs) NEOMsgDecode(data []byte) (int, error) {
...
@@ -540,7 +540,7 @@ func (p *LastIDs) NEOMsgDecode(data []byte) (int, error) {
// 15. AnswerLastIDs
// 15. AnswerLastIDs
func
(
_
*
AnswerLastIDs
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerLastIDs
)
NEOMsgCode
()
uint16
{
return
15
return
15
}
}
...
@@ -567,7 +567,7 @@ overflow:
...
@@ -567,7 +567,7 @@ overflow:
// 16. AskPartitionTable
// 16. AskPartitionTable
func
(
_
*
AskPartitionTable
)
NEOMsgCode
()
uint16
{
func
(
*
AskPartitionTable
)
NEOMsgCode
()
uint16
{
return
16
return
16
}
}
...
@@ -584,7 +584,7 @@ func (p *AskPartitionTable) NEOMsgDecode(data []byte) (int, error) {
...
@@ -584,7 +584,7 @@ func (p *AskPartitionTable) NEOMsgDecode(data []byte) (int, error) {
// 17. AnswerPartitionTable
// 17. AnswerPartitionTable
func
(
_
*
AnswerPartitionTable
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerPartitionTable
)
NEOMsgCode
()
uint16
{
return
17
return
17
}
}
...
@@ -664,7 +664,7 @@ overflow:
...
@@ -664,7 +664,7 @@ overflow:
// 18. NotifyPartitionTable
// 18. NotifyPartitionTable
func
(
_
*
NotifyPartitionTable
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyPartitionTable
)
NEOMsgCode
()
uint16
{
return
18
return
18
}
}
...
@@ -744,7 +744,7 @@ overflow:
...
@@ -744,7 +744,7 @@ overflow:
// 19. NotifyPartitionChanges
// 19. NotifyPartitionChanges
func
(
_
*
NotifyPartitionChanges
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyPartitionChanges
)
NEOMsgCode
()
uint16
{
return
19
return
19
}
}
...
@@ -801,7 +801,7 @@ overflow:
...
@@ -801,7 +801,7 @@ overflow:
// 20. StartOperation
// 20. StartOperation
func
(
_
*
StartOperation
)
NEOMsgCode
()
uint16
{
func
(
*
StartOperation
)
NEOMsgCode
()
uint16
{
return
20
return
20
}
}
...
@@ -826,7 +826,7 @@ overflow:
...
@@ -826,7 +826,7 @@ overflow:
// 21. StopOperation
// 21. StopOperation
func
(
_
*
StopOperation
)
NEOMsgCode
()
uint16
{
func
(
*
StopOperation
)
NEOMsgCode
()
uint16
{
return
21
return
21
}
}
...
@@ -843,7 +843,7 @@ func (p *StopOperation) NEOMsgDecode(data []byte) (int, error) {
...
@@ -843,7 +843,7 @@ func (p *StopOperation) NEOMsgDecode(data []byte) (int, error) {
// 22. UnfinishedTransactions
// 22. UnfinishedTransactions
func
(
_
*
UnfinishedTransactions
)
NEOMsgCode
()
uint16
{
func
(
*
UnfinishedTransactions
)
NEOMsgCode
()
uint16
{
return
22
return
22
}
}
...
@@ -891,7 +891,7 @@ overflow:
...
@@ -891,7 +891,7 @@ overflow:
// 23. AnswerUnfinishedTransactions
// 23. AnswerUnfinishedTransactions
func
(
_
*
AnswerUnfinishedTransactions
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerUnfinishedTransactions
)
NEOMsgCode
()
uint16
{
return
23
return
23
}
}
...
@@ -941,7 +941,7 @@ overflow:
...
@@ -941,7 +941,7 @@ overflow:
// 24. LockedTransactions
// 24. LockedTransactions
func
(
_
*
LockedTransactions
)
NEOMsgCode
()
uint16
{
func
(
*
LockedTransactions
)
NEOMsgCode
()
uint16
{
return
24
return
24
}
}
...
@@ -958,7 +958,7 @@ func (p *LockedTransactions) NEOMsgDecode(data []byte) (int, error) {
...
@@ -958,7 +958,7 @@ func (p *LockedTransactions) NEOMsgDecode(data []byte) (int, error) {
// 25. AnswerLockedTransactions
// 25. AnswerLockedTransactions
func
(
_
*
AnswerLockedTransactions
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerLockedTransactions
)
NEOMsgCode
()
uint16
{
return
25
return
25
}
}
...
@@ -1012,7 +1012,7 @@ overflow:
...
@@ -1012,7 +1012,7 @@ overflow:
// 26. FinalTID
// 26. FinalTID
func
(
_
*
FinalTID
)
NEOMsgCode
()
uint16
{
func
(
*
FinalTID
)
NEOMsgCode
()
uint16
{
return
26
return
26
}
}
...
@@ -1037,7 +1037,7 @@ overflow:
...
@@ -1037,7 +1037,7 @@ overflow:
// 27. AnswerFinalTID
// 27. AnswerFinalTID
func
(
_
*
AnswerFinalTID
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerFinalTID
)
NEOMsgCode
()
uint16
{
return
27
return
27
}
}
...
@@ -1062,7 +1062,7 @@ overflow:
...
@@ -1062,7 +1062,7 @@ overflow:
// 28. ValidateTransaction
// 28. ValidateTransaction
func
(
_
*
ValidateTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
ValidateTransaction
)
NEOMsgCode
()
uint16
{
return
28
return
28
}
}
...
@@ -1089,7 +1089,7 @@ overflow:
...
@@ -1089,7 +1089,7 @@ overflow:
// 29. BeginTransaction
// 29. BeginTransaction
func
(
_
*
BeginTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
BeginTransaction
)
NEOMsgCode
()
uint16
{
return
29
return
29
}
}
...
@@ -1114,7 +1114,7 @@ overflow:
...
@@ -1114,7 +1114,7 @@ overflow:
// 30. AnswerBeginTransaction
// 30. AnswerBeginTransaction
func
(
_
*
AnswerBeginTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerBeginTransaction
)
NEOMsgCode
()
uint16
{
return
30
return
30
}
}
...
@@ -1139,7 +1139,7 @@ overflow:
...
@@ -1139,7 +1139,7 @@ overflow:
// 31. FailedVote
// 31. FailedVote
func
(
_
*
FailedVote
)
NEOMsgCode
()
uint16
{
func
(
*
FailedVote
)
NEOMsgCode
()
uint16
{
return
31
return
31
}
}
...
@@ -1189,7 +1189,7 @@ overflow:
...
@@ -1189,7 +1189,7 @@ overflow:
// 32. FinishTransaction
// 32. FinishTransaction
func
(
_
*
FinishTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
FinishTransaction
)
NEOMsgCode
()
uint16
{
return
32
return
32
}
}
...
@@ -1263,7 +1263,7 @@ overflow:
...
@@ -1263,7 +1263,7 @@ overflow:
// 33. AnswerFinishTransaction
// 33. AnswerFinishTransaction
func
(
_
*
AnswerFinishTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerFinishTransaction
)
NEOMsgCode
()
uint16
{
return
33
return
33
}
}
...
@@ -1290,7 +1290,7 @@ overflow:
...
@@ -1290,7 +1290,7 @@ overflow:
// 34. NotifyTransactionFinished
// 34. NotifyTransactionFinished
func
(
_
*
NotifyTransactionFinished
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyTransactionFinished
)
NEOMsgCode
()
uint16
{
return
34
return
34
}
}
...
@@ -1317,7 +1317,7 @@ overflow:
...
@@ -1317,7 +1317,7 @@ overflow:
// 35. LockInformation
// 35. LockInformation
func
(
_
*
LockInformation
)
NEOMsgCode
()
uint16
{
func
(
*
LockInformation
)
NEOMsgCode
()
uint16
{
return
35
return
35
}
}
...
@@ -1344,7 +1344,7 @@ overflow:
...
@@ -1344,7 +1344,7 @@ overflow:
// 36. AnswerLockInformation
// 36. AnswerLockInformation
func
(
_
*
AnswerLockInformation
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerLockInformation
)
NEOMsgCode
()
uint16
{
return
36
return
36
}
}
...
@@ -1369,7 +1369,7 @@ overflow:
...
@@ -1369,7 +1369,7 @@ overflow:
// 37. InvalidateObjects
// 37. InvalidateObjects
func
(
_
*
InvalidateObjects
)
NEOMsgCode
()
uint16
{
func
(
*
InvalidateObjects
)
NEOMsgCode
()
uint16
{
return
37
return
37
}
}
...
@@ -1419,7 +1419,7 @@ overflow:
...
@@ -1419,7 +1419,7 @@ overflow:
// 38. UnlockInformation
// 38. UnlockInformation
func
(
_
*
UnlockInformation
)
NEOMsgCode
()
uint16
{
func
(
*
UnlockInformation
)
NEOMsgCode
()
uint16
{
return
38
return
38
}
}
...
@@ -1444,7 +1444,7 @@ overflow:
...
@@ -1444,7 +1444,7 @@ overflow:
// 39. GenerateOIDs
// 39. GenerateOIDs
func
(
_
*
GenerateOIDs
)
NEOMsgCode
()
uint16
{
func
(
*
GenerateOIDs
)
NEOMsgCode
()
uint16
{
return
39
return
39
}
}
...
@@ -1469,7 +1469,7 @@ overflow:
...
@@ -1469,7 +1469,7 @@ overflow:
// 40. AnswerGenerateOIDs
// 40. AnswerGenerateOIDs
func
(
_
*
AnswerGenerateOIDs
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerGenerateOIDs
)
NEOMsgCode
()
uint16
{
return
40
return
40
}
}
...
@@ -1517,7 +1517,7 @@ overflow:
...
@@ -1517,7 +1517,7 @@ overflow:
// 41. Deadlock
// 41. Deadlock
func
(
_
*
Deadlock
)
NEOMsgCode
()
uint16
{
func
(
*
Deadlock
)
NEOMsgCode
()
uint16
{
return
41
return
41
}
}
...
@@ -1544,7 +1544,7 @@ overflow:
...
@@ -1544,7 +1544,7 @@ overflow:
// 42. RebaseTransaction
// 42. RebaseTransaction
func
(
_
*
RebaseTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
RebaseTransaction
)
NEOMsgCode
()
uint16
{
return
42
return
42
}
}
...
@@ -1571,7 +1571,7 @@ overflow:
...
@@ -1571,7 +1571,7 @@ overflow:
// 43. AnswerRebaseTransaction
// 43. AnswerRebaseTransaction
func
(
_
*
AnswerRebaseTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerRebaseTransaction
)
NEOMsgCode
()
uint16
{
return
43
return
43
}
}
...
@@ -1619,7 +1619,7 @@ overflow:
...
@@ -1619,7 +1619,7 @@ overflow:
// 44. RebaseObject
// 44. RebaseObject
func
(
_
*
RebaseObject
)
NEOMsgCode
()
uint16
{
func
(
*
RebaseObject
)
NEOMsgCode
()
uint16
{
return
44
return
44
}
}
...
@@ -1646,7 +1646,7 @@ overflow:
...
@@ -1646,7 +1646,7 @@ overflow:
// 45. AnswerRebaseObject
// 45. AnswerRebaseObject
func
(
_
*
AnswerRebaseObject
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerRebaseObject
)
NEOMsgCode
()
uint16
{
return
45
return
45
}
}
...
@@ -1696,7 +1696,7 @@ overflow:
...
@@ -1696,7 +1696,7 @@ overflow:
// 46. StoreObject
// 46. StoreObject
func
(
_
*
StoreObject
)
NEOMsgCode
()
uint16
{
func
(
*
StoreObject
)
NEOMsgCode
()
uint16
{
return
46
return
46
}
}
...
@@ -1750,7 +1750,7 @@ overflow:
...
@@ -1750,7 +1750,7 @@ overflow:
// 47. AnswerStoreObject
// 47. AnswerStoreObject
func
(
_
*
AnswerStoreObject
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerStoreObject
)
NEOMsgCode
()
uint16
{
return
47
return
47
}
}
...
@@ -1775,7 +1775,7 @@ overflow:
...
@@ -1775,7 +1775,7 @@ overflow:
// 48. AbortTransaction
// 48. AbortTransaction
func
(
_
*
AbortTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
AbortTransaction
)
NEOMsgCode
()
uint16
{
return
48
return
48
}
}
...
@@ -1825,7 +1825,7 @@ overflow:
...
@@ -1825,7 +1825,7 @@ overflow:
// 49. StoreTransaction
// 49. StoreTransaction
func
(
_
*
StoreTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
StoreTransaction
)
NEOMsgCode
()
uint16
{
return
49
return
49
}
}
...
@@ -1926,7 +1926,7 @@ overflow:
...
@@ -1926,7 +1926,7 @@ overflow:
// 50. VoteTransaction
// 50. VoteTransaction
func
(
_
*
VoteTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
VoteTransaction
)
NEOMsgCode
()
uint16
{
return
50
return
50
}
}
...
@@ -1951,7 +1951,7 @@ overflow:
...
@@ -1951,7 +1951,7 @@ overflow:
// 51. GetObject
// 51. GetObject
func
(
_
*
GetObject
)
NEOMsgCode
()
uint16
{
func
(
*
GetObject
)
NEOMsgCode
()
uint16
{
return
51
return
51
}
}
...
@@ -1980,7 +1980,7 @@ overflow:
...
@@ -1980,7 +1980,7 @@ overflow:
// 52. AnswerGetObject
// 52. AnswerGetObject
func
(
_
*
AnswerGetObject
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerGetObject
)
NEOMsgCode
()
uint16
{
return
52
return
52
}
}
...
@@ -2034,7 +2034,7 @@ overflow:
...
@@ -2034,7 +2034,7 @@ overflow:
// 53. TIDList
// 53. TIDList
func
(
_
*
TIDList
)
NEOMsgCode
()
uint16
{
func
(
*
TIDList
)
NEOMsgCode
()
uint16
{
return
53
return
53
}
}
...
@@ -2063,7 +2063,7 @@ overflow:
...
@@ -2063,7 +2063,7 @@ overflow:
// 54. AnswerTIDList
// 54. AnswerTIDList
func
(
_
*
AnswerTIDList
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerTIDList
)
NEOMsgCode
()
uint16
{
return
54
return
54
}
}
...
@@ -2111,7 +2111,7 @@ overflow:
...
@@ -2111,7 +2111,7 @@ overflow:
// 55. TIDListFrom
// 55. TIDListFrom
func
(
_
*
TIDListFrom
)
NEOMsgCode
()
uint16
{
func
(
*
TIDListFrom
)
NEOMsgCode
()
uint16
{
return
55
return
55
}
}
...
@@ -2142,7 +2142,7 @@ overflow:
...
@@ -2142,7 +2142,7 @@ overflow:
// 56. AnswerTIDListFrom
// 56. AnswerTIDListFrom
func
(
_
*
AnswerTIDListFrom
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerTIDListFrom
)
NEOMsgCode
()
uint16
{
return
56
return
56
}
}
...
@@ -2190,7 +2190,7 @@ overflow:
...
@@ -2190,7 +2190,7 @@ overflow:
// 57. TransactionInformation
// 57. TransactionInformation
func
(
_
*
TransactionInformation
)
NEOMsgCode
()
uint16
{
func
(
*
TransactionInformation
)
NEOMsgCode
()
uint16
{
return
57
return
57
}
}
...
@@ -2215,7 +2215,7 @@ overflow:
...
@@ -2215,7 +2215,7 @@ overflow:
// 58. AnswerTransactionInformation
// 58. AnswerTransactionInformation
func
(
_
*
AnswerTransactionInformation
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerTransactionInformation
)
NEOMsgCode
()
uint16
{
return
58
return
58
}
}
...
@@ -2318,7 +2318,7 @@ overflow:
...
@@ -2318,7 +2318,7 @@ overflow:
// 59. ObjectHistory
// 59. ObjectHistory
func
(
_
*
ObjectHistory
)
NEOMsgCode
()
uint16
{
func
(
*
ObjectHistory
)
NEOMsgCode
()
uint16
{
return
59
return
59
}
}
...
@@ -2347,7 +2347,7 @@ overflow:
...
@@ -2347,7 +2347,7 @@ overflow:
// 60. AnswerObjectHistory
// 60. AnswerObjectHistory
func
(
_
*
AnswerObjectHistory
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerObjectHistory
)
NEOMsgCode
()
uint16
{
return
60
return
60
}
}
...
@@ -2402,7 +2402,7 @@ overflow:
...
@@ -2402,7 +2402,7 @@ overflow:
// 61. PartitionList
// 61. PartitionList
func
(
_
*
PartitionList
)
NEOMsgCode
()
uint16
{
func
(
*
PartitionList
)
NEOMsgCode
()
uint16
{
return
61
return
61
}
}
...
@@ -2431,7 +2431,7 @@ overflow:
...
@@ -2431,7 +2431,7 @@ overflow:
// 62. AnswerPartitionList
// 62. AnswerPartitionList
func
(
_
*
AnswerPartitionList
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerPartitionList
)
NEOMsgCode
()
uint16
{
return
62
return
62
}
}
...
@@ -2511,7 +2511,7 @@ overflow:
...
@@ -2511,7 +2511,7 @@ overflow:
// 63. NodeList
// 63. NodeList
func
(
_
*
NodeList
)
NEOMsgCode
()
uint16
{
func
(
*
NodeList
)
NEOMsgCode
()
uint16
{
return
63
return
63
}
}
...
@@ -2536,7 +2536,7 @@ overflow:
...
@@ -2536,7 +2536,7 @@ overflow:
// 64. AnswerNodeList
// 64. AnswerNodeList
func
(
_
*
AnswerNodeList
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerNodeList
)
NEOMsgCode
()
uint16
{
return
64
return
64
}
}
...
@@ -2614,7 +2614,7 @@ overflow:
...
@@ -2614,7 +2614,7 @@ overflow:
// 65. SetNodeState
// 65. SetNodeState
func
(
_
*
SetNodeState
)
NEOMsgCode
()
uint16
{
func
(
*
SetNodeState
)
NEOMsgCode
()
uint16
{
return
65
return
65
}
}
...
@@ -2641,7 +2641,7 @@ overflow:
...
@@ -2641,7 +2641,7 @@ overflow:
// 66. AddPendingNodes
// 66. AddPendingNodes
func
(
_
*
AddPendingNodes
)
NEOMsgCode
()
uint16
{
func
(
*
AddPendingNodes
)
NEOMsgCode
()
uint16
{
return
66
return
66
}
}
...
@@ -2689,7 +2689,7 @@ overflow:
...
@@ -2689,7 +2689,7 @@ overflow:
// 67. TweakPartitionTable
// 67. TweakPartitionTable
func
(
_
*
TweakPartitionTable
)
NEOMsgCode
()
uint16
{
func
(
*
TweakPartitionTable
)
NEOMsgCode
()
uint16
{
return
67
return
67
}
}
...
@@ -2737,7 +2737,7 @@ overflow:
...
@@ -2737,7 +2737,7 @@ overflow:
// 68. NotifyNodeInformation
// 68. NotifyNodeInformation
func
(
_
*
NotifyNodeInformation
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyNodeInformation
)
NEOMsgCode
()
uint16
{
return
68
return
68
}
}
...
@@ -2817,7 +2817,7 @@ overflow:
...
@@ -2817,7 +2817,7 @@ overflow:
// 69. NodeInformation
// 69. NodeInformation
func
(
_
*
NodeInformation
)
NEOMsgCode
()
uint16
{
func
(
*
NodeInformation
)
NEOMsgCode
()
uint16
{
return
69
return
69
}
}
...
@@ -2834,7 +2834,7 @@ func (p *NodeInformation) NEOMsgDecode(data []byte) (int, error) {
...
@@ -2834,7 +2834,7 @@ func (p *NodeInformation) NEOMsgDecode(data []byte) (int, error) {
// 70. SetClusterState
// 70. SetClusterState
func
(
_
*
SetClusterState
)
NEOMsgCode
()
uint16
{
func
(
*
SetClusterState
)
NEOMsgCode
()
uint16
{
return
70
return
70
}
}
...
@@ -2859,7 +2859,7 @@ overflow:
...
@@ -2859,7 +2859,7 @@ overflow:
// 71. repairFlags
// 71. repairFlags
func
(
_
*
repairFlags
)
NEOMsgCode
()
uint16
{
func
(
*
repairFlags
)
NEOMsgCode
()
uint16
{
return
71
return
71
}
}
...
@@ -2884,7 +2884,7 @@ overflow:
...
@@ -2884,7 +2884,7 @@ overflow:
// 72. Repair
// 72. Repair
func
(
_
*
Repair
)
NEOMsgCode
()
uint16
{
func
(
*
Repair
)
NEOMsgCode
()
uint16
{
return
72
return
72
}
}
...
@@ -2934,7 +2934,7 @@ overflow:
...
@@ -2934,7 +2934,7 @@ overflow:
// 73. RepairOne
// 73. RepairOne
func
(
_
*
RepairOne
)
NEOMsgCode
()
uint16
{
func
(
*
RepairOne
)
NEOMsgCode
()
uint16
{
return
73
return
73
}
}
...
@@ -2959,7 +2959,7 @@ overflow:
...
@@ -2959,7 +2959,7 @@ overflow:
// 74. NotifyClusterState
// 74. NotifyClusterState
func
(
_
*
NotifyClusterState
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyClusterState
)
NEOMsgCode
()
uint16
{
return
74
return
74
}
}
...
@@ -2984,7 +2984,7 @@ overflow:
...
@@ -2984,7 +2984,7 @@ overflow:
// 75. AskClusterState
// 75. AskClusterState
func
(
_
*
AskClusterState
)
NEOMsgCode
()
uint16
{
func
(
*
AskClusterState
)
NEOMsgCode
()
uint16
{
return
75
return
75
}
}
...
@@ -3001,7 +3001,7 @@ func (p *AskClusterState) NEOMsgDecode(data []byte) (int, error) {
...
@@ -3001,7 +3001,7 @@ func (p *AskClusterState) NEOMsgDecode(data []byte) (int, error) {
// 76. AnswerClusterState
// 76. AnswerClusterState
func
(
_
*
AnswerClusterState
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerClusterState
)
NEOMsgCode
()
uint16
{
return
76
return
76
}
}
...
@@ -3026,7 +3026,7 @@ overflow:
...
@@ -3026,7 +3026,7 @@ overflow:
// 77. ObjectUndoSerial
// 77. ObjectUndoSerial
func
(
_
*
ObjectUndoSerial
)
NEOMsgCode
()
uint16
{
func
(
*
ObjectUndoSerial
)
NEOMsgCode
()
uint16
{
return
77
return
77
}
}
...
@@ -3080,7 +3080,7 @@ overflow:
...
@@ -3080,7 +3080,7 @@ overflow:
// 78. AnswerObjectUndoSerial
// 78. AnswerObjectUndoSerial
func
(
_
*
AnswerObjectUndoSerial
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerObjectUndoSerial
)
NEOMsgCode
()
uint16
{
return
78
return
78
}
}
...
@@ -3148,7 +3148,7 @@ overflow:
...
@@ -3148,7 +3148,7 @@ overflow:
// 79. CheckCurrentSerial
// 79. CheckCurrentSerial
func
(
_
*
CheckCurrentSerial
)
NEOMsgCode
()
uint16
{
func
(
*
CheckCurrentSerial
)
NEOMsgCode
()
uint16
{
return
79
return
79
}
}
...
@@ -3177,7 +3177,7 @@ overflow:
...
@@ -3177,7 +3177,7 @@ overflow:
// 80. Pack
// 80. Pack
func
(
_
*
Pack
)
NEOMsgCode
()
uint16
{
func
(
*
Pack
)
NEOMsgCode
()
uint16
{
return
80
return
80
}
}
...
@@ -3202,7 +3202,7 @@ overflow:
...
@@ -3202,7 +3202,7 @@ overflow:
// 81. AnswerPack
// 81. AnswerPack
func
(
_
*
AnswerPack
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerPack
)
NEOMsgCode
()
uint16
{
return
81
return
81
}
}
...
@@ -3227,7 +3227,7 @@ overflow:
...
@@ -3227,7 +3227,7 @@ overflow:
// 82. CheckReplicas
// 82. CheckReplicas
func
(
_
*
CheckReplicas
)
NEOMsgCode
()
uint16
{
func
(
*
CheckReplicas
)
NEOMsgCode
()
uint16
{
return
82
return
82
}
}
...
@@ -3285,7 +3285,7 @@ overflow:
...
@@ -3285,7 +3285,7 @@ overflow:
// 83. CheckPartition
// 83. CheckPartition
func
(
_
*
CheckPartition
)
NEOMsgCode
()
uint16
{
func
(
*
CheckPartition
)
NEOMsgCode
()
uint16
{
return
83
return
83
}
}
...
@@ -3351,7 +3351,7 @@ overflow:
...
@@ -3351,7 +3351,7 @@ overflow:
// 84. CheckTIDRange
// 84. CheckTIDRange
func
(
_
*
CheckTIDRange
)
NEOMsgCode
()
uint16
{
func
(
*
CheckTIDRange
)
NEOMsgCode
()
uint16
{
return
84
return
84
}
}
...
@@ -3382,7 +3382,7 @@ overflow:
...
@@ -3382,7 +3382,7 @@ overflow:
// 85. AnswerCheckTIDRange
// 85. AnswerCheckTIDRange
func
(
_
*
AnswerCheckTIDRange
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerCheckTIDRange
)
NEOMsgCode
()
uint16
{
return
85
return
85
}
}
...
@@ -3411,7 +3411,7 @@ overflow:
...
@@ -3411,7 +3411,7 @@ overflow:
// 86. CheckSerialRange
// 86. CheckSerialRange
func
(
_
*
CheckSerialRange
)
NEOMsgCode
()
uint16
{
func
(
*
CheckSerialRange
)
NEOMsgCode
()
uint16
{
return
86
return
86
}
}
...
@@ -3444,7 +3444,7 @@ overflow:
...
@@ -3444,7 +3444,7 @@ overflow:
// 87. AnswerCheckSerialRange
// 87. AnswerCheckSerialRange
func
(
_
*
AnswerCheckSerialRange
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerCheckSerialRange
)
NEOMsgCode
()
uint16
{
return
87
return
87
}
}
...
@@ -3477,7 +3477,7 @@ overflow:
...
@@ -3477,7 +3477,7 @@ overflow:
// 88. PartitionCorrupted
// 88. PartitionCorrupted
func
(
_
*
PartitionCorrupted
)
NEOMsgCode
()
uint16
{
func
(
*
PartitionCorrupted
)
NEOMsgCode
()
uint16
{
return
88
return
88
}
}
...
@@ -3527,7 +3527,7 @@ overflow:
...
@@ -3527,7 +3527,7 @@ overflow:
// 89. LastTransaction
// 89. LastTransaction
func
(
_
*
LastTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
LastTransaction
)
NEOMsgCode
()
uint16
{
return
89
return
89
}
}
...
@@ -3544,7 +3544,7 @@ func (p *LastTransaction) NEOMsgDecode(data []byte) (int, error) {
...
@@ -3544,7 +3544,7 @@ func (p *LastTransaction) NEOMsgDecode(data []byte) (int, error) {
// 90. AnswerLastTransaction
// 90. AnswerLastTransaction
func
(
_
*
AnswerLastTransaction
)
NEOMsgCode
()
uint16
{
func
(
*
AnswerLastTransaction
)
NEOMsgCode
()
uint16
{
return
90
return
90
}
}
...
@@ -3569,7 +3569,7 @@ overflow:
...
@@ -3569,7 +3569,7 @@ overflow:
// 91. NotifyReady
// 91. NotifyReady
func
(
_
*
NotifyReady
)
NEOMsgCode
()
uint16
{
func
(
*
NotifyReady
)
NEOMsgCode
()
uint16
{
return
91
return
91
}
}
...
...
go/neo/protogen.go
View file @
547a6fa9
...
@@ -216,7 +216,7 @@ import (
...
@@ -216,7 +216,7 @@ import (
case
*
ast
.
StructType
:
case
*
ast
.
StructType
:
fmt
.
Fprintf
(
&
buf
,
"// %d. %s
\n\n
"
,
msgCode
,
typename
)
fmt
.
Fprintf
(
&
buf
,
"// %d. %s
\n\n
"
,
msgCode
,
typename
)
buf
.
emit
(
"func (
_
*%s) NEOMsgCode() uint16 {"
,
typename
)
buf
.
emit
(
"func (*%s) NEOMsgCode() uint16 {"
,
typename
)
buf
.
emit
(
"return %d"
,
msgCode
)
buf
.
emit
(
"return %d"
,
msgCode
)
buf
.
emit
(
"}
\n
"
)
buf
.
emit
(
"}
\n
"
)
...
...
go/neo/server/cluster_test.go
View file @
547a6fa9
...
@@ -47,8 +47,6 @@ import (
...
@@ -47,8 +47,6 @@ import (
"fmt"
"fmt"
)
)
var
_
=
fmt
.
Print
// XXX dup from connection_test
// XXX dup from connection_test
func
xwait
(
w
interface
{
Wait
()
error
})
{
func
xwait
(
w
interface
{
Wait
()
error
})
{
err
:=
w
.
Wait
()
err
:=
w
.
Wait
()
...
@@ -75,7 +73,11 @@ func (t *MyTracer) TraceNetTx(ev *xnet.TraceTx) {} // { t.Trace1(ev) }
...
@@ -75,7 +73,11 @@ func (t *MyTracer) TraceNetTx(ev *xnet.TraceTx) {} // { t.Trace1(ev) }
type
traceNeoRecv
struct
{
conn
*
neo
.
Conn
;
msg
neo
.
Msg
}
type
traceNeoRecv
struct
{
conn
*
neo
.
Conn
;
msg
neo
.
Msg
}
func
(
t
*
MyTracer
)
traceNeoConnRecv
(
c
*
neo
.
Conn
,
msg
neo
.
Msg
)
{
t
.
Trace1
(
&
traceNeoRecv
{
c
,
msg
})
}
func
(
t
*
MyTracer
)
traceNeoConnRecv
(
c
*
neo
.
Conn
,
msg
neo
.
Msg
)
{
t
.
Trace1
(
&
traceNeoRecv
{
c
,
msg
})
}
type
traceNeoSend
struct
{
conn
*
neo
.
Conn
;
msg
neo
.
Msg
}
type
traceNeoSend
struct
{
Src
,
Dst
net
.
Addr
ConnID
uint32
Msg
neo
.
Msg
}
func
(
t
*
MyTracer
)
traceNeoConnSend
(
c
*
neo
.
Conn
,
msg
neo
.
Msg
)
{
t
.
Trace1
(
&
traceNeoSend
{
c
,
msg
})
}
func
(
t
*
MyTracer
)
traceNeoConnSend
(
c
*
neo
.
Conn
,
msg
neo
.
Msg
)
{
t
.
Trace1
(
&
traceNeoSend
{
c
,
msg
})
}
...
@@ -140,7 +142,7 @@ func TestMasterStorage(t *testing.T) {
...
@@ -140,7 +142,7 @@ func TestMasterStorage(t *testing.T) {
tracing
.
Lock
()
tracing
.
Lock
()
neo_traceConnRecv_Attach
(
pg
,
tracer
.
traceNeoConnRecv
)
neo_traceConnRecv_Attach
(
pg
,
tracer
.
traceNeoConnRecv
)
neo_traceConnSend
_Attach
(
pg
,
tracer
.
traceNeoConnSend
)
neo_traceConnSend
Pre_Attach
(
pg
,
tracer
.
traceNeoConnSendPre
)
tracing
.
Unlock
()
tracing
.
Unlock
()
...
@@ -177,7 +179,7 @@ func TestMasterStorage(t *testing.T) {
...
@@ -177,7 +179,7 @@ func TestMasterStorage(t *testing.T) {
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
wg
.
Gox
(
func
()
{
wg
.
Gox
(
func
()
{
err
:=
M
.
Run
(
Mctx
)
err
:=
M
.
Run
(
Mctx
)
fmt
.
Println
(
"err: "
,
err
)
fmt
.
Println
(
"
M
err: "
,
err
)
_
=
err
// XXX
_
=
err
// XXX
})
})
...
@@ -193,6 +195,7 @@ func TestMasterStorage(t *testing.T) {
...
@@ -193,6 +195,7 @@ func TestMasterStorage(t *testing.T) {
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
wg
.
Gox
(
func
()
{
wg
.
Gox
(
func
()
{
err
:=
S
.
Run
(
Sctx
)
err
:=
S
.
Run
(
Sctx
)
fmt
.
Println
(
"S err: "
,
err
)
_
=
err
// XXX
_
=
err
// XXX
})
})
...
@@ -206,15 +209,20 @@ func TestMasterStorage(t *testing.T) {
...
@@ -206,15 +209,20 @@ func TestMasterStorage(t *testing.T) {
//)
//)
_
=
nettx
_
=
nettx
tc
.
Expect
(
conntx
(
"s:1"
,
"m:1"
,
1
,
RequestIdentification
{
...
})
// ... M adjust nodetab...
conntx
(
"m:1"
,
"s:1"
,
1
,
AcceptIdentification
{
...
})
)
// XXX temp
//return
// M <- S .? RequestIdentification{...} + TODO test ID rejects
// M <- S .? RequestIdentification{...} + TODO test ID rejects
println
(
"111"
)
tc
.
Expect
(
netlisten
(
"s:0"
))
// XXX no -> temp only to get complate
println
(
"222"
)
// XXX temp
return
return
// M.nodeTab <- Node(S) XXX order can be racy?
// M.nodeTab <- Node(S) XXX order can be racy?
...
...
go/neo/ztrace.go
View file @
547a6fa9
...
@@ -6,9 +6,6 @@ package neo
...
@@ -6,9 +6,6 @@ package neo
import
(
import
(
"lab.nexedi.com/kirr/neo/go/xcommon/tracing"
"lab.nexedi.com/kirr/neo/go/xcommon/tracing"
"unsafe"
"unsafe"
"lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet"
"net"
)
)
// traceevent: traceConnRecv(c *Conn, msg Msg)
// traceevent: traceConnRecv(c *Conn, msg Msg)
...
@@ -38,55 +35,32 @@ func traceConnRecv_Attach(pg *tracing.ProbeGroup, probe func(c *Conn, msg Msg))
...
@@ -38,55 +35,32 @@ func traceConnRecv_Attach(pg *tracing.ProbeGroup, probe func(c *Conn, msg Msg))
return
&
p
.
Probe
return
&
p
.
Probe
}
}
// traceevent: traceConnSend(c *Conn, msg Msg)
// traceevent: traceConnSend
Pre
(c *Conn, msg Msg)
type
_t_traceConnSend
struct
{
type
_t_traceConnSend
Pre
struct
{
tracing
.
Probe
tracing
.
Probe
probefunc
func
(
c
*
Conn
,
msg
Msg
)
probefunc
func
(
c
*
Conn
,
msg
Msg
)
}
}
var
_traceConnSend
*
_t_traceConnSend
var
_traceConnSend
Pre
*
_t_traceConnSendPre
func
traceConnSend
(
c
*
Conn
,
msg
Msg
)
{
func
traceConnSend
Pre
(
c
*
Conn
,
msg
Msg
)
{
if
_traceConnSend
!=
nil
{
if
_traceConnSend
Pre
!=
nil
{
_traceConnSend_run
(
c
,
msg
)
_traceConnSend
Pre
_run
(
c
,
msg
)
}
}
}
}
func
_traceConnSend_run
(
c
*
Conn
,
msg
Msg
)
{
func
_traceConnSend
Pre
_run
(
c
*
Conn
,
msg
Msg
)
{
for
p
:=
_traceConnSend
;
p
!=
nil
;
p
=
(
*
_t_traceConnSend
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
for
p
:=
_traceConnSend
Pre
;
p
!=
nil
;
p
=
(
*
_t_traceConnSendPre
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
p
.
probefunc
(
c
,
msg
)
p
.
probefunc
(
c
,
msg
)
}
}
}
}
func
traceConnSend_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
func
traceConnSend
Pre
_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
p
:=
_t_traceConnSend
{
probefunc
:
probe
}
p
:=
_t_traceConnSend
Pre
{
probefunc
:
probe
}
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnSend
)),
&
p
.
Probe
)
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnSend
Pre
)),
&
p
.
Probe
)
return
&
p
.
Probe
return
&
p
.
Probe
}
}
// trace export signature
// trace export signature
func
_trace_exporthash_bc56cd7a9caf82c14d9586243f763e65afb91ea0
()
{}
func
_trace_exporthash_d2fa0ebb37c3e2bf54309859a1eeb0e831edd435
()
{}
// traceimport: "lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet"
// rerun "gotrace gen" if you see link failure ↓↓↓
//go:linkname pipenet_trace_exporthash lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet._trace_exporthash_e77a134646e20f099af466ab3192282237d2e547
func
pipenet_trace_exporthash
()
func
init
()
{
pipenet_trace_exporthash
()
}
//go:linkname pipenet_traceAccept_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceAccept_Attach
func
pipenet_traceAccept_Attach
(
*
tracing
.
ProbeGroup
,
func
(
conn
net
.
Conn
))
*
tracing
.
Probe
//go:linkname pipenet_traceDial_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceDial_Attach
func
pipenet_traceDial_Attach
(
*
tracing
.
ProbeGroup
,
func
(
addr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceListen_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceListen_Attach
func
pipenet_traceListen_Attach
(
*
tracing
.
ProbeGroup
,
func
(
laddr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNew_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNew_Attach
func
pipenet_traceNew_Attach
(
*
tracing
.
ProbeGroup
,
func
(
name
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNewHost_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNewHost_Attach
func
pipenet_traceNewHost_Attach
(
*
tracing
.
ProbeGroup
,
func
(
host
*
pipenet
.
Host
))
*
tracing
.
Probe
go/neo/ztrace.s
deleted
100644 → 0
View file @
bca096a5
//
Code
generated
by
lab
.
nexedi
.
com
/
kirr
/
go123
/
tracing
/
cmd
/
gotrace
; DO NOT EDIT.
//
empty
.
s
so
`
go
build
`
does
not
use
-
complete
for
go
:
linkname
to
work
go/xcommon/xtesting/xtesting.go
View file @
547a6fa9
...
@@ -63,10 +63,9 @@ func (st *SyncTracer) Trace1(event interface{}) {
...
@@ -63,10 +63,9 @@ func (st *SyncTracer) Trace1(event interface{}) {
// Get1 receives message with 1 tracing event from a producer
// Get1 receives message with 1 tracing event from a producer
// The consumer, after dealing with the message, must send back an ack.
// The consumer, after dealing with the message, must send back an ack.
func
(
st
*
SyncTracer
)
Get1
()
*
SyncTraceMsg
{
func
(
st
*
SyncTracer
)
Get1
()
*
SyncTraceMsg
{
return
<-
st
.
tracech
msg
:=
<-
st
.
tracech
//msg := <-st.tracech
fmt
.
Printf
(
"trace: get1: %T %v
\n
"
,
msg
.
Event
,
msg
.
Event
)
//fmt.Printf("trace: get1: %T %v\n", msg.Event, msg.Event)
return
msg
//return msg
}
}
...
...
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