Versions in this module Expand all Collapse all v1 v1.1.3 Jan 1, 2023 Changes in this version + type InboundInfo struct + BucketHub *sync.Map + NodeSpeedLimit uint64 + Tag string + UserInfo *sync.Map + UserOnlineIP *sync.Map + type Limiter struct + InboundInfo *sync.Map + func New() *Limiter + func (l *Limiter) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.UserInfo) error + func (l *Limiter) DeleteInboundLimiter(tag string) error + func (l *Limiter) GetOnlineDevice(tag string) (*[]api.OnlineUser, error) + func (l *Limiter) GetUserBucket(tag string, email string, ip string) (limiter *ratelimit.Bucket, SpeedLimit bool, Reject bool) + func (l *Limiter) RateWriter(writer buf.Writer, limiter *ratelimit.Bucket) buf.Writer + func (l *Limiter) UpdateInboundLimiter(tag string, updatedUserList *[]api.UserInfo) error + type UserInfo struct + DeviceLimit int + SpeedLimit uint64 + UID int + type Writer struct + func (w *Writer) Close() error + func (w *Writer) WriteMultiBuffer(mb buf.MultiBuffer) error