Lots more tests
This commit is contained in:
		
							parent
							
								
									5ef83a7ba0
								
							
						
					
					
						commit
						e8688fed4b
					
				
					 6 changed files with 186 additions and 98 deletions
				
			
		| 
						 | 
				
			
			@ -12,6 +12,9 @@ const (
 | 
			
		|||
	DefaultKeepaliveInterval = 30 * time.Second
 | 
			
		||||
	DefaultManagerInterval   = time.Minute
 | 
			
		||||
	DefaultAtSenderInterval  = 10 * time.Second
 | 
			
		||||
	DefaultMinDelay          = 10 * time.Second
 | 
			
		||||
	DefaultMaxDelay          = 3 * 24 * time.Hour
 | 
			
		||||
	DefaultMessageLimit      = 512
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Defines all the limits
 | 
			
		||||
| 
						 | 
				
			
			@ -37,6 +40,9 @@ type Config struct {
 | 
			
		|||
	KeepaliveInterval            time.Duration
 | 
			
		||||
	ManagerInterval              time.Duration
 | 
			
		||||
	AtSenderInterval             time.Duration
 | 
			
		||||
	MessageLimit                 int
 | 
			
		||||
	MinDelay                     time.Duration
 | 
			
		||||
	MaxDelay                     time.Duration
 | 
			
		||||
	GlobalTopicLimit             int
 | 
			
		||||
	VisitorRequestLimitBurst     int
 | 
			
		||||
	VisitorRequestLimitReplenish time.Duration
 | 
			
		||||
| 
						 | 
				
			
			@ -56,6 +62,9 @@ func New(listenHTTP string) *Config {
 | 
			
		|||
		CacheDuration:                DefaultCacheDuration,
 | 
			
		||||
		KeepaliveInterval:            DefaultKeepaliveInterval,
 | 
			
		||||
		ManagerInterval:              DefaultManagerInterval,
 | 
			
		||||
		MessageLimit:                 DefaultMessageLimit,
 | 
			
		||||
		MinDelay:                     DefaultMinDelay,
 | 
			
		||||
		MaxDelay:                     DefaultMaxDelay,
 | 
			
		||||
		AtSenderInterval:             DefaultAtSenderInterval,
 | 
			
		||||
		GlobalTopicLimit:             DefaultGlobalTopicLimit,
 | 
			
		||||
		VisitorRequestLimitBurst:     DefaultVisitorRequestLimitBurst,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue