mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 11:29:48 +08:00
5b9988b627
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com> Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
28 lines
661 B
Go
28 lines
661 B
Go
package proxy
|
|
|
|
type getVChannelsFuncType = func(collectionID UniqueID) ([]vChan, error)
|
|
type removeDMLStreamFuncType = func(collectionID UniqueID) error
|
|
|
|
type mockChannelsMgr struct {
|
|
channelsMgr
|
|
getVChannelsFuncType
|
|
removeDMLStreamFuncType
|
|
}
|
|
|
|
func (m *mockChannelsMgr) getVChannels(collectionID UniqueID) ([]vChan, error) {
|
|
if m.getVChannelsFuncType != nil {
|
|
return m.getVChannelsFuncType(collectionID)
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
func (m *mockChannelsMgr) removeDMLStream(collectionID UniqueID) {
|
|
if m.removeDMLStreamFuncType != nil {
|
|
m.removeDMLStreamFuncType(collectionID)
|
|
}
|
|
}
|
|
|
|
func newMockChannelsMgr() *mockChannelsMgr {
|
|
return &mockChannelsMgr{}
|
|
}
|