Commit 1bfbe86e authored by harrylee's avatar harrylee

expose launcher interface

parent b0d3bccb
package internal package internal
type Launcher interface { //type Launcher interface {
Start() error // Start() error
Stop() error // Stop() error
} //}
...@@ -89,7 +89,7 @@ func TestSyncHeader001(t *testing.T) { ...@@ -89,7 +89,7 @@ func TestSyncHeader001(t *testing.T) {
ch <- w6 ch <- w6
ch <- w7 ch <- w7
// for normal handling // for normal handling
ch <- w2 ch <- litew2
ch <- w3 ch <- w3
} }
close(ch) close(ch)
......
package plugins package plugins
import ( import (
"gitlab.33.cn/link33/sidecar/internal"
"gitlab.33.cn/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
...@@ -11,10 +10,14 @@ type Kernel interface { ...@@ -11,10 +10,14 @@ type Kernel interface {
Exited() bool Exited() bool
} }
type Launcher interface {
Start() error
Stop() error
}
// Client defines the interface that interacts with appchain // Client defines the interface that interacts with appchain
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go //go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go
type Client interface { // 业务实现委托接口。 type Client interface { // 业务实现委托接口。
internal.Launcher Launcher
Kernel Kernel
Bind(kern Kernel) Bind(kern Kernel)
......
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