Force initial refresh
This commit is contained in:
		
							
								
								
									
										6
									
								
								hosts.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hosts.go
									
									
									
									
									
								
							| @ -30,7 +30,11 @@ func NewHosts(hs HostsSettings, rs RedisSettings) Hosts { | |||||||
| 		providers = append(providers, NewRedisProvider(rc, hs.RedisKey)) | 		providers = append(providers, NewRedisProvider(rc, hs.RedisKey)) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return Hosts{providers, time.Second * time.Duration(hs.RefreshInterval)} | 	h := Hosts{providers, time.Second * time.Duration(hs.RefreshInterval)} | ||||||
|  |  | ||||||
|  | 	h.refresh() | ||||||
|  |  | ||||||
|  | 	return h | ||||||
| } | } | ||||||
|  |  | ||||||
| func (h *Hosts) refresh() { | func (h *Hosts) refresh() { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user