Commit bf12b436 authored by suyanlong's avatar suyanlong

update hub client interface

parent 8c74ffdc
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
"github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/link33/sidecar/internal"
"github.com/link33/sidecar/model/pb" "github.com/link33/sidecar/model/pb"
) )
...@@ -17,8 +18,7 @@ const ( ...@@ -17,8 +18,7 @@ const (
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source client.go //go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source client.go
type Client interface { type Client interface {
// Close all connections between link33 and the client. internal.Launcher
Stop() error
// Reset ecdsa key. // Reset ecdsa key.
SetPrivateKey(crypto.PrivateKey) SetPrivateKey(crypto.PrivateKey)
......
...@@ -518,6 +518,20 @@ func (mr *MockClientMockRecorder) SetPrivateKey(arg0 interface{}) *gomock.Call { ...@@ -518,6 +518,20 @@ func (mr *MockClientMockRecorder) SetPrivateKey(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPrivateKey", reflect.TypeOf((*MockClient)(nil).SetPrivateKey), arg0) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPrivateKey", reflect.TypeOf((*MockClient)(nil).SetPrivateKey), arg0)
} }
// Start mocks base method.
func (m *MockClient) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *MockClientMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClient)(nil).Start))
}
// Stop mocks base method. // Stop mocks base method.
func (m *MockClient) Stop() error { func (m *MockClient) Stop() error {
m.ctrl.T.Helper() m.ctrl.T.Helper()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment