mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
[skip ci] Fix golint warning of conf_adapter_mgr.go (#11026)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
parent
5eb0b67fbc
commit
66c255c02e
@ -16,16 +16,19 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
// ConfAdapterMgr manages the conf adapter.
|
||||
type ConfAdapterMgr interface {
|
||||
// GetAdapter gets the conf adapter by the index type.
|
||||
GetAdapter(indexType string) (ConfAdapter, error)
|
||||
}
|
||||
|
||||
// ConfAdapterMgrImpl implements ConfAdapter
|
||||
// ConfAdapterMgrImpl implements ConfAdapter.
|
||||
type ConfAdapterMgrImpl struct {
|
||||
init bool
|
||||
adapters map[IndexType]ConfAdapter
|
||||
}
|
||||
|
||||
// GetAdapter gets the conf adapter by the index type.
|
||||
func (mgr *ConfAdapterMgrImpl) GetAdapter(indexType string) (ConfAdapter, error) {
|
||||
if !mgr.init {
|
||||
mgr.registerConfAdapter()
|
||||
@ -68,6 +71,7 @@ func newConfAdapterMgrImpl() *ConfAdapterMgrImpl {
|
||||
var confAdapterMgr ConfAdapterMgr
|
||||
var getConfAdapterMgrOnce sync.Once
|
||||
|
||||
// GetConfAdapterMgrInstance gets the instance of ConfAdapterMgr.
|
||||
func GetConfAdapterMgrInstance() ConfAdapterMgr {
|
||||
getConfAdapterMgrOnce.Do(func() {
|
||||
confAdapterMgr = newConfAdapterMgrImpl()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user