mirror of https://github.com/v2ray/v2ray-core
comments
parent
fb7dd1a577
commit
d9cdfffc69
|
@ -20,6 +20,7 @@ type user struct {
|
|||
lastSec protocol.Timestamp
|
||||
}
|
||||
|
||||
// TimedUserValidator is a user Validator based on time.
|
||||
type TimedUserValidator struct {
|
||||
sync.RWMutex
|
||||
users []*user
|
||||
|
@ -34,6 +35,7 @@ type indexTimePair struct {
|
|||
timeInc uint32
|
||||
}
|
||||
|
||||
// NewTimedUserValidator creates a new TimedUserValidator.
|
||||
func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator {
|
||||
tuv := &TimedUserValidator{
|
||||
users: make([]*user, 0, 16),
|
||||
|
|
Loading…
Reference in New Issue