mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			344 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			344 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package dnsserver
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/coredns/coredns/plugin/pkg/watch"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func watchables(zones map[string]*Config) []watch.Watchable {
							 | 
						||
| 
								 | 
							
									var w []watch.Watchable
							 | 
						||
| 
								 | 
							
									for _, config := range zones {
							 | 
						||
| 
								 | 
							
										plugins := config.Handlers()
							 | 
						||
| 
								 | 
							
										for _, p := range plugins {
							 | 
						||
| 
								 | 
							
											if x, ok := p.(watch.Watchable); ok {
							 | 
						||
| 
								 | 
							
												w = append(w, x)
							 | 
						||
| 
								 | 
							
											}
							 | 
						||
| 
								 | 
							
										}
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return w
							 | 
						||
| 
								 | 
							
								}
							 |