mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-11-04 15:00:19 +01:00 
			
		
		
		
	Rate limits make sense now!
This commit is contained in:
		
							parent
							
								
									a036814d98
								
							
						
					
					
						commit
						c874a641df
					
				
					 17 changed files with 365 additions and 205 deletions
				
			
		| 
						 | 
				
			
			@ -27,8 +27,14 @@ type FixedLimiter struct {
 | 
			
		|||
 | 
			
		||||
// NewFixedLimiter creates a new Limiter
 | 
			
		||||
func NewFixedLimiter(limit int64) *FixedLimiter {
 | 
			
		||||
	return NewFixedLimiterWithValue(limit, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewFixedLimiterWithValue creates a new Limiter and sets the initial value
 | 
			
		||||
func NewFixedLimiterWithValue(limit, value int64) *FixedLimiter {
 | 
			
		||||
	return &FixedLimiter{
 | 
			
		||||
		limit: limit,
 | 
			
		||||
		value: value,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue