Documentation ¶ Index ¶ type ILimiter type IOLimiter func NewIOLimiter(cap, cyc int, users db.IUserDB) *IOLimiter func (lm *IOLimiter) CanRead(id uint64, chunkSize int) (bool, error) func (lm *IOLimiter) CanWrite(id uint64, chunkSize int) (bool, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ILimiter ¶ type ILimiter interface { CanWrite(userID uint64, chunkSize int) (bool, error) CanRead(userID uint64, chunkSize int) (bool, error) } type IOLimiter ¶ type IOLimiter struct { UploadLimiter *golimiter.Limiter DownloadLimiter *golimiter.Limiter // contains filtered or unexported fields } func NewIOLimiter ¶ func NewIOLimiter(cap, cyc int, users db.IUserDB) *IOLimiter func (*IOLimiter) CanRead ¶ func (lm *IOLimiter) CanRead(id uint64, chunkSize int) (bool, error) func (*IOLimiter) CanWrite ¶ func (lm *IOLimiter) CanWrite(id uint64, chunkSize int) (bool, error) Source Files ¶ View all Source files iolimiter.go Click to show internal directories. Click to hide internal directories.