Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar
Commits
02c8d076
Commit
02c8d076
authored
Nov 03, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove hub client function
parent
7755849f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
126 deletions
+0
-126
client.go
hub/client/client.go
+0
-21
mock_client.go
hub/client/mock_client/mock_client.go
+0
-105
No files found.
hub/client/client.go
View file @
02c8d076
...
...
@@ -95,31 +95,10 @@ type Client interface {
// Get link33's signatures specified by id and type.
GetMultiSigns
(
id
string
,
typ
pb
.
GetMultiSignsRequest_Type
)
(
*
pb
.
SignResponse
,
error
)
// Get link33 TPS during block [begin, end]
GetTPS
(
begin
,
end
uint64
)
(
uint64
,
error
)
// GetPendingNonceByAccount returns the latest nonce of an account in the pending status,
// and it should be the nonce for next transaction
GetPendingNonceByAccount
(
account
string
)
(
uint64
,
error
)
// Delete node according to its pid
DelVPNode
(
pid
string
)
(
*
pb
.
Response
,
error
)
// IPFSPutFromLocal puts local file to ipfs network
IPFSPutFromLocal
(
localfPath
string
)
(
*
pb
.
Response
,
error
)
// IPFSGet gets from ipfs network
IPFSGet
(
path
string
)
(
*
pb
.
Response
,
error
)
// IPFSGetToLocal gets from ipfs and saves to local file path
IPFSGetToLocal
(
path
string
,
localfPath
string
)
(
*
pb
.
Response
,
error
)
// Check whethe there is a master sidecar connect to the link33.
CheckMasterSidecar
(
address
string
)
(
*
pb
.
Response
,
error
)
// Set the master sidecar connect to the link33.
SetMasterSidecar
(
address
string
,
index
string
,
timeout
int64
)
(
*
pb
.
Response
,
error
)
// Update the master sidecar status
HeartBeat
(
address
string
,
index
string
)
(
*
pb
.
Response
,
error
)
}
...
...
hub/client/mock_client/mock_client.go
View file @
02c8d076
...
...
@@ -38,36 +38,6 @@ func (m *MockClient) EXPECT() *MockClientMockRecorder {
return
m
.
recorder
}
// CheckMasterSidecar mocks base method.
func
(
m
*
MockClient
)
CheckMasterSidecar
(
address
string
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"CheckMasterSidecar"
,
address
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// CheckMasterSidecar indicates an expected call of CheckMasterSidecar.
func
(
mr
*
MockClientMockRecorder
)
CheckMasterSidecar
(
address
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"CheckMasterSidecar"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
CheckMasterSidecar
),
address
)
}
// DelVPNode mocks base method.
func
(
m
*
MockClient
)
DelVPNode
(
pid
string
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"DelVPNode"
,
pid
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// DelVPNode indicates an expected call of DelVPNode.
func
(
mr
*
MockClientMockRecorder
)
DelVPNode
(
pid
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"DelVPNode"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
DelVPNode
),
pid
)
}
// DeployContract mocks base method.
func
(
m
*
MockClient
)
DeployContract
(
contract
[]
byte
,
opts
*
rpcx
.
TransactOpts
)
(
*
types
.
Address
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
...
...
@@ -281,21 +251,6 @@ func (mr *MockClientMockRecorder) GetReceipt(hash interface{}) *gomock.Call {
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"GetReceipt"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
GetReceipt
),
hash
)
}
// GetTPS mocks base method.
func
(
m
*
MockClient
)
GetTPS
(
begin
,
end
uint64
)
(
uint64
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"GetTPS"
,
begin
,
end
)
ret0
,
_
:=
ret
[
0
]
.
(
uint64
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// GetTPS indicates an expected call of GetTPS.
func
(
mr
*
MockClientMockRecorder
)
GetTPS
(
begin
,
end
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"GetTPS"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
GetTPS
),
begin
,
end
)
}
// GetTransaction mocks base method.
func
(
m
*
MockClient
)
GetTransaction
(
hash
string
)
(
*
pb
.
GetTransactionResponse
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
...
...
@@ -341,51 +296,6 @@ func (mr *MockClientMockRecorder) HeartBeat(address, index interface{}) *gomock.
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"HeartBeat"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
HeartBeat
),
address
,
index
)
}
// IPFSGet mocks base method.
func
(
m
*
MockClient
)
IPFSGet
(
path
string
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"IPFSGet"
,
path
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// IPFSGet indicates an expected call of IPFSGet.
func
(
mr
*
MockClientMockRecorder
)
IPFSGet
(
path
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"IPFSGet"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
IPFSGet
),
path
)
}
// IPFSGetToLocal mocks base method.
func
(
m
*
MockClient
)
IPFSGetToLocal
(
path
,
localfPath
string
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"IPFSGetToLocal"
,
path
,
localfPath
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// IPFSGetToLocal indicates an expected call of IPFSGetToLocal.
func
(
mr
*
MockClientMockRecorder
)
IPFSGetToLocal
(
path
,
localfPath
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"IPFSGetToLocal"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
IPFSGetToLocal
),
path
,
localfPath
)
}
// IPFSPutFromLocal mocks base method.
func
(
m
*
MockClient
)
IPFSPutFromLocal
(
localfPath
string
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"IPFSPutFromLocal"
,
localfPath
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// IPFSPutFromLocal indicates an expected call of IPFSPutFromLocal.
func
(
mr
*
MockClientMockRecorder
)
IPFSPutFromLocal
(
localfPath
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"IPFSPutFromLocal"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
IPFSPutFromLocal
),
localfPath
)
}
// InvokeBVMContract mocks base method.
func
(
m
*
MockClient
)
InvokeBVMContract
(
address
*
types
.
Address
,
method
string
,
opts
*
rpcx
.
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
...
...
@@ -491,21 +401,6 @@ func (mr *MockClientMockRecorder) SendView(tx interface{}) *gomock.Call {
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"SendView"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
SendView
),
tx
)
}
// SetMasterSidecar mocks base method.
func
(
m
*
MockClient
)
SetMasterSidecar
(
address
,
index
string
,
timeout
int64
)
(
*
pb
.
Response
,
error
)
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"SetMasterSidecar"
,
address
,
index
,
timeout
)
ret0
,
_
:=
ret
[
0
]
.
(
*
pb
.
Response
)
ret1
,
_
:=
ret
[
1
]
.
(
error
)
return
ret0
,
ret1
}
// SetMasterSidecar indicates an expected call of SetMasterSidecar.
func
(
mr
*
MockClientMockRecorder
)
SetMasterSidecar
(
address
,
index
,
timeout
interface
{})
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"SetMasterSidecar"
,
reflect
.
TypeOf
((
*
MockClient
)(
nil
)
.
SetMasterSidecar
),
address
,
index
,
timeout
)
}
// SetPrivateKey mocks base method.
func
(
m
*
MockClient
)
SetPrivateKey
(
arg0
crypto
.
PrivateKey
)
{
m
.
ctrl
.
T
.
Helper
()
...
...
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