Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy interface {
//set next proxy
NextProxy(proxy interface{})
//get proxy name
ProxyName() string
}
type ProxyFactory ¶
type ProxyFactory struct {
// contains filtered or unexported fields
}
func NewProxyFactory ¶
func NewProxyFactory(options ...ProxyFactoryOption) *ProxyFactory
func (*ProxyFactory) GetFirstInstance ¶
func (this *ProxyFactory) GetFirstInstance(realName string, realInstance interface{}, proxys ...func() interface{}) interface{}
GetFirstInstance implement init mul level proxy, RealInstance and proxys make sure both implement the same interface return firstProxy | realInstance
func (*ProxyFactory) GetInstances ¶
func (this *ProxyFactory) GetInstances(realName string, proxys ...func() interface{}) []interface{}
type ProxyFactoryOption ¶
type ProxyFactoryOption func(c *ProxyFactory)
type ProxyFactoryOptions ¶
type ProxyFactoryOptions struct{}
func (ProxyFactoryOptions) WithLogger ¶
func (ProxyFactoryOptions) WithLogger(log log.Logger) ProxyFactoryOption
Click to show internal directories.
Click to hide internal directories.