12 lines
264 B
Go
12 lines
264 B
Go
package registry
|
|
|
|
import "reflect"
|
|
|
|
type ComponentRegistry interface {
|
|
RegisterType(t reflect.Type, name string) error
|
|
RegisterFactory(i interface{}) error
|
|
|
|
GetInstance(t reflect.Type) (interface{}, error)
|
|
GetInstanceByName(name string) (interface{}, error)
|
|
}
|