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 ¶
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 ¶
func GetAccesskeyStorages(name string) filter.AccessKeyStorage
GetAccesskeyStorages find the storage with the name. If not found, it will panic.
func GetAllCustomShutdownCallbacks ¶
GetAllCustomShutdownCallbacks ...
func GetAuthenticator ¶
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 ¶
func GetConfigReaders(name string) interfaces.ConfigReader
GetConfigReaders get a config reader by name.
func GetConfigurator ¶
func GetConfigurator(name string, url *common.URL) config_center.Configurator
GetConfigurator ...
func GetDefaultConfigReader ¶
GetDefaultConfigReader
func GetDefaultConfigurator ¶
func GetDefaultConfigurator(url *common.URL) config_center.Configurator
GetDefaultConfigurator ...
func GetDefaultConfiguratorFunc ¶
func GetDefaultConfiguratorFunc() getConfiguratorFunc
GetDefaultConfiguratorFunc ...
func GetFileRouterFactories ¶
func GetFileRouterFactories() map[string]router.FIleRouterFactory
GetFileRouterFactories Get all create file router factory instance
func GetHealthChecker ¶
func GetHealthChecker(name string, url *common.URL) router.HealthChecker
GetHealthChecker get the HealthChecker with name
func GetMetricReporter ¶
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 ¶
func GetNewRestClient(name string, restOptions *client.RestOptions) client.RestClient
func GetNewRestServer ¶
func GetNewRestServer(name string) server.RestServer
func GetRegistry ¶
GetRegistry ...
func GetRejectedExecutionHandler ¶
func GetRejectedExecutionHandler(name string) filter.RejectedExecutionHandler
GetRejectedExecutionHandler ...
func GetRouterFactories ¶
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 ¶
func GetTpsLimitStrategyCreator(name string) filter.TpsLimitStrategyCreator
GetTpsLimitStrategyCreator ...
func SetAccesskeyStorages ¶
func SetAccesskeyStorages(name string, fcn func() filter.AccessKeyStorage)
SetAccesskeyStorages will set the fcn into map with this name
func SetAuthenticator ¶
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 ¶
func SetConfigReaders(name string, v func() interfaces.ConfigReader)
SetConfigReaders set a creator of config reader.
func SetDefaultConfigReader ¶
func SetDefaultConfigReader(module, name string)
SetDefaultConfigReader set {name} to default config reader for {module}
func SetDefaultConfigurator ¶
func SetDefaultConfigurator(v getConfiguratorFunc)
SetDefaultConfigurator ...
func SetLoadbalance ¶
func SetLoadbalance(name string, fcn func() cluster.LoadBalance)
SetLoadbalance ...
func SetMetricReporter ¶
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 ¶
func SetRejectedExecutionHandler(name string, creator func() filter.RejectedExecutionHandler)
SetRejectedExecutionHandler ...
func SetRestClient ¶
func SetRestClient(name string, fun func(restOptions *client.RestOptions) client.RestClient)
func SetRestServer ¶
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 ¶
func SetTpsLimitStrategy(name string, creator filter.TpsLimitStrategyCreator)
SetTpsLimitStrategy ...
func SetTpsLimiter ¶
func SetTpsLimiter(name string, creator func() filter.TpsLimiter)
SetTpsLimiter ...
func SethealthChecker ¶
func SethealthChecker(name string, fcn func(url *common.URL) router.HealthChecker)
SethealthChecker set the HealthChecker with name
Types ¶
This section is empty.