Documentation
¶
Index ¶
- Constants
- Variables
- type Container
- func (c *Container) Get(plugin plugin.Plugin, names ...string) (interface{}, error)
- func (c *Container) Invoke(fn interface{}) ([]reflect.Value, error)
- func (c *Container) NewChild() *Container
- func (c *Container) Populate() error
- func (c *Container) PopulateSingle(val plugin.Plugin, opts ...Option) (bool, error)
- func (c *Container) Provide(plug plugin.Plugin, opts ...Option) error
- func (c *Container) ProvideFunc(v interface{}, opts ...Option) error
- type InjectTag
- type Option
Constants ¶
View Source
const (
TagOptionNotRequired = "NR" // Not Required, 标注该字段在执行注入时, 如果没有找到对应的实例, 则忽略该字段
)
Variables ¶
View Source
var (
ErrorDependNotCompleted = errors.New("依赖尚未完成")
)
Functions ¶
This section is empty.
Types ¶
type Container ¶
Container 容器实现
func NewWithParent ¶
NewWithParent 创建一个新的容器, 并指定父容器
func (*Container) PopulateSingle ¶
func (*Container) ProvideFunc ¶
Click to show internal directories.
Click to hide internal directories.