extension

package
v1.4.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
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

func GetAllCustomShutdownCallbacks() *list.List

GetAllCustomShutdownCallbacks ...

func GetAuthenticator

func GetAuthenticator(name string) filter.Authenticator

GetAuthenticator find the Authenticator with name if not found, it will panic

func GetCluster

func GetCluster(name string) cluster.Cluster

GetCluster ...

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

func GetDefaultConfigReader() map[string]string

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 GetFilter

func GetFilter(name string) filter.Filter

GetFilter ...

func GetHealthChecker

func GetHealthChecker(name string, url *common.URL) router.HealthChecker

GetHealthChecker get the HealthChecker with name

func GetLoadbalance

func GetLoadbalance(name string) cluster.LoadBalance

GetLoadbalance ...

func GetMetricReporter

func GetMetricReporter(name string) metrics.Reporter

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 GetProtocol

func GetProtocol(name string) protocol.Protocol

GetProtocol ...

func GetProxyFactory

func GetProxyFactory(name string) proxy.ProxyFactory

GetProxyFactory ...

func GetRegistry

func GetRegistry(name string, config *common.URL) (registry.Registry, error)

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 GetTpsLimiter

func GetTpsLimiter(name string) filter.TpsLimiter

GetTpsLimiter ...

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 SetCluster

func SetCluster(name string, fcn func() cluster.Cluster)

SetCluster ...

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 SetConfigurator

func SetConfigurator(name string, v getConfiguratorFunc)

SetConfigurator ...

func SetDefaultConfigReader

func SetDefaultConfigReader(module, name string)

SetDefaultConfigReader set {name} to default config reader for {module}

func SetDefaultConfigurator

func SetDefaultConfigurator(v getConfiguratorFunc)

SetDefaultConfigurator ...

func SetFilter

func SetFilter(name string, v func() filter.Filter)

SetFilter ...

func SetLoadbalance

func SetLoadbalance(name string, fcn func() cluster.LoadBalance)

SetLoadbalance ...

func SetMetricReporter

func SetMetricReporter(name string, reporterFunc func() metrics.Reporter)

SetMetricReporter set a reporter with the name

func SetProtocol

func SetProtocol(name string, v func() protocol.Protocol)

SetProtocol ...

func SetProxyFactory

func SetProxyFactory(name string, f func(...proxy.Option) proxy.ProxyFactory)

SetProxyFactory ...

func SetRegistry

func SetRegistry(name string, v func(config *common.URL) (registry.Registry, error))

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL