Documentation ¶
Index ¶
- Constants
- func Delete(name string)
- func Invoke(fn interface{}, opts ...InvokeOption) error
- func MustInvoke(fn interface{}, opts ...InvokeOption)
- func MustProvide(ctor interface{}, opts ...ProvideOption)
- func Provide(ctor interface{}, opts ...ProvideOption) error
- type Container
- type InvokeOption
- type Option
- type ProvideOption
Constants ¶
View Source
const ( // DefaultContainerName 默认容器名称 DefaultContainerName string = "_default_" )
Variables ¶
This section is empty.
Functions ¶
func Invoke ¶
func Invoke(fn interface{}, opts ...InvokeOption) error
func MustInvoke ¶
func MustInvoke(fn interface{}, opts ...InvokeOption)
func MustProvide ¶
func MustProvide(ctor interface{}, opts ...ProvideOption)
func Provide ¶
func Provide(ctor interface{}, opts ...ProvideOption) error
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container 容器
func (*Container) Invoke ¶
func (c *Container) Invoke(fn interface{}, opts ...InvokeOption) error
func (*Container) Provide ¶
func (c *Container) Provide(ctor interface{}, opts ...ProvideOption) error
Container ----------------------------------------------------------------------------------
type InvokeOption ¶
type InvokeOption interface { }
type ProvideOption ¶
type ProvideOption interface { }
ProviderOption a provideOption modifies the default behavior of Provide.
Click to show internal directories.
Click to hide internal directories.