add registry interface
This commit is contained in:
parent
330efab056
commit
0f0679a3ec
9
registry/registry.go
Normal file
9
registry/registry.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package registry
|
||||||
|
|
||||||
|
type Registry[T any] interface {
|
||||||
|
Register(name string, v T) error
|
||||||
|
Unregister(name string)
|
||||||
|
IsRegistered(name string) bool
|
||||||
|
Get(name string) T
|
||||||
|
GetAll() map[string]T
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user