Add positionProvider implementation assertion (#9261)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/9286/head
congqixia 2021-10-05 20:58:04 +08:00 committed by GitHub
parent cbbdbc699c
commit 768535f31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,8 @@ type positionProvider interface {
GetVChanPositions(vchans []vchannel, seekFromStartPosition bool) ([]*datapb.VchannelInfo, error)
}
var _ positionProvider = (*dummyPosProvider)(nil)
type dummyPosProvider struct{}
//GetVChanPositions implements positionProvider

View File

@ -79,6 +79,9 @@ type RootCoordCreatorFunc func(ctx context.Context, metaRootPath string, etcdEnd
// makes sure Server implements `DataCoord`
var _ types.DataCoord = (*Server)(nil)
// makes sure Server implements `positionProvider`
var _ positionProvider = (*Server)(nil)
// Server implements `types.Datacoord`
// handles Data Cooridinator related jobs
type Server struct {