Documentation
¶
Index ¶
- Constants
- func AddCustomShutdownCallback(callback func())
- func GetAccesskeyStorages(name string) filter.AccessKeyStorage
- func GetAllCustomShutdownCallbacks() *list.List
- func GetAuthenticator(name string) filter.Authenticator
- 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 GetConfigReaders(name string) interfaces.ConfigReader
- func GetConfigurator(name string, url *common.URL) config_center.Configurator
- func GetDefaultConfigReader() map[string]string
- func GetDefaultConfigurator(url *common.URL) config_center.Configurator
- func GetDefaultConfiguratorFunc() getConfiguratorFunc
- func GetFileRouterFactories() map[string]router.FIleRouterFactory
- func GetFilter(name string) filter.Filter
- func GetHealthChecker(name string, url *common.URL) router.HealthChecker
- func GetLoadbalance(name string) cluster.LoadBalance
- func GetMetricReporter(name string) metrics.Reporter
- func GetNewRestClient(name string, restOptions *client.RestOptions) client.RestClient
- func GetNewRestServer(name string) server.RestServer
- 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 GetRouterFactories() map[string]func() router.RouterFactory
- func GetRouterFactory(name string) router.RouterFactory
- func GetTpsLimitStrategyCreator(name string) filter.TpsLimitStrategyCreator
- func GetTpsLimiter(name string) filter.TpsLimiter
- func SetAccesskeyStorages(name string, fcn func() filter.AccessKeyStorage)
- func SetAuthenticator(name string, fcn func() filter.Authenticator)
- func SetCluster(name string, fcn func() cluster.Cluster)
- func SetConfigCenter(name string, ...)
- func SetConfigCenterFactory(name string, v func() config_center.DynamicConfigurationFactory)
- func SetConfigReaders(name string, v func() interfaces.ConfigReader)
- func SetConfigurator(name string, v getConfiguratorFunc)
- func SetDefaultConfigReader(module, name string)
- func SetDefaultConfigurator(v getConfiguratorFunc)
- func SetFilter(name string, v func() filter.Filter)
- func SetLoadbalance(name string, fcn func() cluster.LoadBalance)
- func SetMetricReporter(name string, reporterFunc func() metrics.Reporter)
- 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 SetRestClient(name string, fun func(restOptions *client.RestOptions) client.RestClient)
- func SetRestServer(name string, fun func() server.RestServer)
- func SetRouterFactory(name string, fun func() router.RouterFactory)
- func SetTpsLimitStrategy(name string, creator filter.TpsLimitStrategyCreator)
- func SetTpsLimiter(name string, creator func() filter.TpsLimiter)
- func SethealthChecker(name string, fcn func(url *common.URL) router.HealthChecker)
Constants ¶
const (
// DefaultKey ...
DefaultKey = "default"
)
Variables ¶
This section is empty.
Functions ¶
func AddCustomShutdownCallback ¶ added in v1.3.0
func AddCustomShutdownCallback(callback func())
*
- AddCustomShutdownCallback
- 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 GetAccesskeyStorages ¶ added in v1.4.0
func GetAccesskeyStorages(name string) filter.AccessKeyStorage
GetAccesskeyStorages find the storage with the name. If not found, it will panic.
func GetAllCustomShutdownCallbacks ¶ added in v1.3.0
GetAllCustomShutdownCallbacks ...
func GetAuthenticator ¶ added in v1.4.0
func GetAuthenticator(name string) filter.Authenticator
GetAuthenticator find the Authenticator with name if not found, it will panic
func GetConfigCenter ¶
func GetConfigCenter(name string, config *common.URL) (config_center.DynamicConfiguration, error)
GetConfigCenter ...
func GetConfigCenterFactory ¶
func GetConfigCenterFactory(name string) config_center.DynamicConfigurationFactory
GetConfigCenterFactory ...
func GetConfigReaders ¶ added in v1.4.0
func GetConfigReaders(name string) interfaces.ConfigReader
GetConfigReaders get a config reader by name.
func GetConfigurator ¶ added in v1.2.0
func GetConfigurator(name string, url *common.URL) config_center.Configurator
GetConfigurator ...
func GetDefaultConfigReader ¶ added in v1.4.0
GetDefaultConfigReader
func GetDefaultConfigurator ¶ added in v1.2.0
func GetDefaultConfigurator(url *common.URL) config_center.Configurator
GetDefaultConfigurator ...
func GetDefaultConfiguratorFunc ¶ added in v1.2.0
func GetDefaultConfiguratorFunc() getConfiguratorFunc
GetDefaultConfiguratorFunc ...
func GetFileRouterFactories ¶ added in v1.4.0
func GetFileRouterFactories() map[string]router.FIleRouterFactory
GetFileRouterFactories Get all create file router factory instance
func GetHealthChecker ¶ added in v1.4.0
func GetHealthChecker(name string, url *common.URL) router.HealthChecker
GetHealthChecker get the HealthChecker with name
func GetMetricReporter ¶ added in v1.4.0
GetMetricReporter find the reporter with name. if not found, it will panic. we should know that this method usually is called when system starts, so we should panic
func GetNewRestClient ¶ added in v1.4.0
func GetNewRestClient(name string, restOptions *client.RestOptions) client.RestClient
func GetNewRestServer ¶ added in v1.4.0
func GetNewRestServer(name string) server.RestServer
func GetRegistry ¶
GetRegistry ...
func GetRejectedExecutionHandler ¶ added in v1.2.0
func GetRejectedExecutionHandler(name string) filter.RejectedExecutionHandler
GetRejectedExecutionHandler ...
func GetRouterFactories ¶ added in v1.4.0
func GetRouterFactories() map[string]func() router.RouterFactory
GetRouterFactories Get all create router factory function
func GetRouterFactory ¶
func GetRouterFactory(name string) router.RouterFactory
GetRouterFactory Get create router factory function by name
func GetTpsLimitStrategyCreator ¶ added in v1.2.0
func GetTpsLimitStrategyCreator(name string) filter.TpsLimitStrategyCreator
GetTpsLimitStrategyCreator ...
func GetTpsLimiter ¶ added in v1.2.0
func GetTpsLimiter(name string) filter.TpsLimiter
GetTpsLimiter ...
func SetAccesskeyStorages ¶ added in v1.4.0
func SetAccesskeyStorages(name string, fcn func() filter.AccessKeyStorage)
SetAccesskeyStorages will set the fcn into map with this name
func SetAuthenticator ¶ added in v1.4.0
func SetAuthenticator(name string, fcn func() filter.Authenticator)
SetAuthenticator put the fcn into map with name
func SetConfigCenter ¶
func SetConfigCenter(name string, v func(config *common.URL) (config_center.DynamicConfiguration, error))
SetConfigCenter ...
func SetConfigCenterFactory ¶
func SetConfigCenterFactory(name string, v func() config_center.DynamicConfigurationFactory)
SetConfigCenterFactory ...
func SetConfigReaders ¶ added in v1.4.0
func SetConfigReaders(name string, v func() interfaces.ConfigReader)
SetConfigReaders set a creator of config reader.
func SetConfigurator ¶ added in v1.2.0
func SetConfigurator(name string, v getConfiguratorFunc)
SetConfigurator ...
func SetDefaultConfigReader ¶ added in v1.4.0
func SetDefaultConfigReader(module, name string)
SetDefaultConfigReader set {name} to default config reader for {module}
func SetDefaultConfigurator ¶ added in v1.2.0
func SetDefaultConfigurator(v getConfiguratorFunc)
SetDefaultConfigurator ...
func SetLoadbalance ¶
func SetLoadbalance(name string, fcn func() cluster.LoadBalance)
SetLoadbalance ...
func SetMetricReporter ¶ added in v1.4.0
SetMetricReporter set a reporter with the name
func SetProxyFactory ¶
func SetProxyFactory(name string, f func(...proxy.Option) proxy.ProxyFactory)
SetProxyFactory ...
func SetRegistry ¶
SetRegistry ...
func SetRejectedExecutionHandler ¶ added in v1.2.0
func SetRejectedExecutionHandler(name string, creator func() filter.RejectedExecutionHandler)
SetRejectedExecutionHandler ...
func SetRestClient ¶ added in v1.4.0
func SetRestClient(name string, fun func(restOptions *client.RestOptions) client.RestClient)
func SetRestServer ¶ added in v1.4.0
func SetRestServer(name string, fun func() server.RestServer)
func SetRouterFactory ¶
func SetRouterFactory(name string, fun func() router.RouterFactory)
SetRouterFactory Set create router factory function by name
func SetTpsLimitStrategy ¶ added in v1.2.0
func SetTpsLimitStrategy(name string, creator filter.TpsLimitStrategyCreator)
SetTpsLimitStrategy ...
func SetTpsLimiter ¶ added in v1.2.0
func SetTpsLimiter(name string, creator func() filter.TpsLimiter)
SetTpsLimiter ...
func SethealthChecker ¶ added in v1.4.0
func SethealthChecker(name string, fcn func(url *common.URL) router.HealthChecker)
SethealthChecker set the HealthChecker with name
Types ¶
This section is empty.