Skip to content
Snippets Groups Projects
Commit 6ced4478 authored by aliiohs's avatar aliiohs
Browse files

del unuseless file

parent 18895efd
No related branches found
No related tags found
No related merge requests found
package extension
import (
"github.com/apache/dubbo-go/cluster"
"github.com/apache/dubbo-go/common"
)
var (
engines = make(map[string]func(config *common.URL) (cluster.Router, error))
)
func SetEngine(name string, v func(config *common.URL) (cluster.Router, error)) {
engines[name] = v
}
func GetEngine(name string, config *common.URL) (cluster.Router, error) {
if engines[name] == nil {
panic("registry for " + name + " is not existing, make sure you have import the package.")
}
return engines[name](config)
}
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