mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	
		
			
	
	
		
			21 lines
		
	
	
		
			488 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			488 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package kubernetes
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/coredns/coredns/plugin/pkg/watch"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// SetWatchChan implements watch.Watchable
							 | 
						||
| 
								 | 
							
								func (k *Kubernetes) SetWatchChan(c watch.Chan) {
							 | 
						||
| 
								 | 
							
									k.APIConn.SetWatchChan(c)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Watch is called when a watch is started for a name.
							 | 
						||
| 
								 | 
							
								func (k *Kubernetes) Watch(qname string) error {
							 | 
						||
| 
								 | 
							
									return k.APIConn.Watch(qname)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// StopWatching is called when no more watches remain for a name
							 | 
						||
| 
								 | 
							
								func (k *Kubernetes) StopWatching(qname string) {
							 | 
						||
| 
								 | 
							
									k.APIConn.StopWatching(qname)
							 | 
						||
| 
								 | 
							
								}
							 |