Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // OverrideAllowed allows the registry to override // an already registered interface by name if it is true, // otherwise registry will panic. OverrideAllowed bool }
Config is a struct containing all config for registry
type Registry ¶
type Registry interface { // Register registers a interface by name. // It will panic if name corresponds to an already registered interface // and the registry does not allow user to override the interface. Register(name string, v interface{}) error // Get returns an interface registered with the given name Get(name string) (interface{}, bool) // Range calls f sequentially for each key and value present in the registry. // If f returns false, range stops the iteration. Range(func(key string, value interface{}) bool) // Keys returns the name of all registered interfaces Keys() []string // Values returns all registered interfaces Values() []interface{} }
Registry provides a place binding name and interface{}
Click to show internal directories.
Click to hide internal directories.