functional/tester: add "EtcdClientEndpoints" to "Checker"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-04-11 19:22:54 -07:00
parent e9c4bad2d1
commit f574a9aaed
8 changed files with 62 additions and 32 deletions

View File

@ -17,14 +17,16 @@ package tester
import "github.com/coreos/etcd/functional/rpcpb"
type runnerChecker struct {
ctype rpcpb.Checker
errc chan error
ctype rpcpb.Checker
etcdClientEndpoint string
errc chan error
}
func newRunnerChecker(errc chan error) Checker {
func newRunnerChecker(ep string, errc chan error) Checker {
return &runnerChecker{
ctype: rpcpb.Checker_RUNNER,
errc: errc,
ctype: rpcpb.Checker_RUNNER,
etcdClientEndpoint: ep,
errc: errc,
}
}
@ -32,6 +34,10 @@ func (rc *runnerChecker) Type() rpcpb.Checker {
return rc.ctype
}
func (rc *runnerChecker) EtcdClientEndpoints() []string {
return []string{rc.etcdClientEndpoint}
}
func (rc *runnerChecker) Check() error {
select {
case err := <-rc.errc: