Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorInvalidBalance = errors.New("invalid balance")
)
Functions ¶
func Register ¶
func Register(key string, factory IDynamicFactory)
Register 注册balance工厂到默认balanceFactory注册器
Types ¶
type IDynamicDriver ¶
type IDynamicFactory ¶
type IDynamicFactory interface {
Create(name string, value []string) (IDynamicDriver, error)
}
func GetFactory ¶
func GetFactory(name string) (IDynamicFactory, error)
GetFactory 获取指定负载均衡算法工厂,若指定的不存在则返回一个已注册的工厂
type IFactoryRegister ¶
type IFactoryRegister interface { RegisterFactoryByKey(key string, factory IDynamicFactory) GetFactoryByKey(key string) (IDynamicFactory, bool) Keys() []string }
IFactoryRegister 实现了负载均衡算法工厂管理器
type Param ¶
type Param struct {
// contains filtered or unexported fields
}
func (*Param) Generate ¶
func (m *Param) Generate(ctx http_service.IHttpContext, contentType string, args ...interface{}) (interface{}, error)
type ParamValue ¶
type ParamValue struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.