Documentation ¶
Index ¶
- Constants
- func AddCustomShutdownCallback(callback func())
- func GetAllCustomShutdownCallbacks() *list.List
- func GetCluster(name string) cluster.Cluster
- func GetConfigCenter(name string, config *common.URL) (config_center.DynamicConfiguration, error)
- func GetConfigCenterFactory(name string) config_center.DynamicConfigurationFactory
- func GetConfigurator(name string, url *common.URL) config_center.Configurator
- func GetDefaultConfigurator(url *common.URL) config_center.Configurator
- func GetDefaultConfiguratorFunc() getConfiguratorFunc
- func GetFilter(name string) filter.Filter
- func GetLoadbalance(name string) cluster.LoadBalance
- func GetProtocol(name string) protocol.Protocol
- func GetProxyFactory(name string) proxy.ProxyFactory
- func GetRegistry(name string, config *common.URL) (registry.Registry, error)
- func GetRejectedExecutionHandler(name string) filter.RejectedExecutionHandler
- func GetRouterFactory(name string) cluster.RouterFactory
- func GetTpsLimitStrategyCreator(name string) filter.TpsLimitStrategyCreator
- func GetTpsLimiter(name string) filter.TpsLimiter
- func SetCluster(name string, fcn func() cluster.Cluster)
- func SetConfigCenter(name string, ...)
- func SetConfigCenterFactory(name string, v func() config_center.DynamicConfigurationFactory)
- func SetConfigurator(name string, v getConfiguratorFunc)
- func SetDefaultConfigurator(v getConfiguratorFunc)
- func SetFilter(name string, v func() filter.Filter)
- func SetLoadbalance(name string, fcn func() cluster.LoadBalance)
- func SetProtocol(name string, v func() protocol.Protocol)
- func SetProxyFactory(name string, f func(...proxy.Option) proxy.ProxyFactory)
- func SetRegistry(name string, v func(config *common.URL) (registry.Registry, error))
- func SetRejectedExecutionHandler(name string, creator func() filter.RejectedExecutionHandler)
- func SetRouterFactory(name string, fun func() cluster.RouterFactory)
- func SetTpsLimitStrategy(name string, creator filter.TpsLimitStrategyCreator)
- func SetTpsLimiter(name string, creator func() filter.TpsLimiter)
Constants ¶
View Source
const DefaultKey = "default"
Variables ¶
This section is empty.
Functions ¶
func AddCustomShutdownCallback ¶ added in v1.3.0
func AddCustomShutdownCallback(callback func())
*
- you should not make any assumption about the order.
- For example, if you have more than one callbacks, and you wish the order is:
- callback1()
- callback2()
- ...
- callbackN()
- Then you should put then together:
- func callback() {
- callback1()
- callback2()
- ...
- callbackN()
- }
- I think the order of custom callbacks should be decided by the users.
- Even though I can design a mechanism to support the ordered custom callbacks,
- the benefit of that mechanism is low.
- And it may introduce much complication for another users.
func GetAllCustomShutdownCallbacks ¶ added in v1.3.0
func GetCluster ¶
func GetConfigCenter ¶
func GetConfigCenter(name string, config *common.URL) (config_center.DynamicConfiguration, error)
func GetConfigCenterFactory ¶
func GetConfigCenterFactory(name string) config_center.DynamicConfigurationFactory
func GetConfigurator ¶ added in v1.2.0
func GetConfigurator(name string, url *common.URL) config_center.Configurator
func GetDefaultConfigurator ¶ added in v1.2.0
func GetDefaultConfigurator(url *common.URL) config_center.Configurator
func GetDefaultConfiguratorFunc ¶ added in v1.2.0
func GetDefaultConfiguratorFunc() getConfiguratorFunc
func GetLoadbalance ¶
func GetLoadbalance(name string) cluster.LoadBalance
func GetProtocol ¶
func GetProxyFactory ¶
func GetProxyFactory(name string) proxy.ProxyFactory
func GetRejectedExecutionHandler ¶ added in v1.2.0
func GetRejectedExecutionHandler(name string) filter.RejectedExecutionHandler
func GetRouterFactory ¶
func GetRouterFactory(name string) cluster.RouterFactory
func GetTpsLimitStrategyCreator ¶ added in v1.2.0
func GetTpsLimitStrategyCreator(name string) filter.TpsLimitStrategyCreator
func GetTpsLimiter ¶ added in v1.2.0
func GetTpsLimiter(name string) filter.TpsLimiter
func SetCluster ¶
func SetConfigCenter ¶
func SetConfigCenter(name string, v func(config *common.URL) (config_center.DynamicConfiguration, error))
func SetConfigCenterFactory ¶
func SetConfigCenterFactory(name string, v func() config_center.DynamicConfigurationFactory)
func SetConfigurator ¶ added in v1.2.0
func SetConfigurator(name string, v getConfiguratorFunc)
func SetDefaultConfigurator ¶ added in v1.2.0
func SetDefaultConfigurator(v getConfiguratorFunc)
func SetLoadbalance ¶
func SetLoadbalance(name string, fcn func() cluster.LoadBalance)
func SetProtocol ¶
func SetProxyFactory ¶
func SetProxyFactory(name string, f func(...proxy.Option) proxy.ProxyFactory)
func SetRegistry ¶
func SetRejectedExecutionHandler ¶ added in v1.2.0
func SetRejectedExecutionHandler(name string, creator func() filter.RejectedExecutionHandler)
func SetRouterFactory ¶
func SetRouterFactory(name string, fun func() cluster.RouterFactory)
func SetTpsLimitStrategy ¶ added in v1.2.0
func SetTpsLimitStrategy(name string, creator filter.TpsLimitStrategyCreator)
func SetTpsLimiter ¶ added in v1.2.0
func SetTpsLimiter(name string, creator func() filter.TpsLimiter)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.