extension

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 32

Documentation

Index

Constants

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

func GetAllCustomShutdownCallbacks() *list.List

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

func GetDefaultConfigReader() map[string]string

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 GetFilter

func GetFilter(name string) filter.Filter

GetFilter ...

func GetHealthChecker added in v1.4.0

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 added in v1.4.0

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 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 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 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 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 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 SetFilter

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

SetFilter ...

func SetLoadbalance

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

SetLoadbalance ...

func SetMetricReporter added in v1.4.0

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 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.

Jump to

Keyboard shortcuts

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