Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCustomRejectedExecutionHandler ¶
func GetCustomRejectedExecutionHandler() filter.RejectedExecutionHandler
func GetDefaultValueRejectedExecutionHandlerSingleton ¶
func GetDefaultValueRejectedExecutionHandlerSingleton() filter.RejectedExecutionHandler
*
- the better way is designing the RejectedExecutionHandler as singleton.
Types ¶
type DefaultValueRejectedExecutionHandler ¶
type DefaultValueRejectedExecutionHandler struct {
// contains filtered or unexported fields
}
*
- The RejectedExecutionHandler is used by some components,
- e.g, ExecuteLimitFilter, GracefulShutdownFilter, TpsLimitFilter.
- When the requests are rejected, the RejectedExecutionHandler allows you to do something.
- You can alert the developer, or redirect those requests to another providers. It depends on what you need. *
- Let's assume that you need a RejectedExecutionHandler which will return some default result if the request was rejected.
func (*DefaultValueRejectedExecutionHandler) RejectedExecution ¶
func (mh *DefaultValueRejectedExecutionHandler) RejectedExecution(url *common.URL, invocation protocol.Invocation) protocol.Result
type RandomTpsLimitStrategy ¶
type RandomTpsLimitStrategy struct {
// contains filtered or unexported fields
}
*
- The RandomTpsLimitStrategy should not be singleton because different TpsLimiter will create many instances.
- we won't want them affect each other.
func (RandomTpsLimitStrategy) IsAllowable ¶
func (r RandomTpsLimitStrategy) IsAllowable() bool
type RandomTpsLimitStrategyCreator ¶
type RandomTpsLimitStrategyCreator struct{}
func (*RandomTpsLimitStrategyCreator) Create ¶
func (creator *RandomTpsLimitStrategyCreator) Create(rate int, interval int) filter.TpsLimitStrategy
type User ¶
func (User) JavaClassName ¶
type UserProvider ¶
type UserProvider struct { }
func (*UserProvider) GetUser ¶
func (u *UserProvider) GetUser(ctx context.Context, req []interface{}) (*User, error)
func (*UserProvider) Reference ¶ added in v1.5.7
func (u *UserProvider) Reference() string
Click to show internal directories.
Click to hide internal directories.