Documentation ¶
Index ¶
- Variables
- type Config
- type IpLimiter
- type Option
- type Registry
- func (m *Registry) AutoReload(interval time.Duration, reloader func() *Config)
- func (m *Registry) GC(timeout time.Duration)
- func (m *Registry) Get(name string) (*IpLimiter, bool)
- func (m *Registry) GetOrRegister(name string, rate rate.Limit, burst int) *IpLimiter
- func (m *Registry) WhiteListed(name string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRegistryCfx = NewRegistry()
View Source
var DefaultRegistryEth = NewRegistry()
Functions ¶
This section is empty.
Types ¶
type IpLimiter ¶
type IpLimiter struct { Option // contains filtered or unexported fields }
IpLimiter is used to limit requests from different users.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) AutoReload ¶
func (*Registry) GetOrRegister ¶
func (*Registry) WhiteListed ¶
Click to show internal directories.
Click to hide internal directories.