mirror of https://github.com/grafana/grafana.git
				
				
				
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			377 B
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			377 B
		
	
	
	
		
			Go
		
	
	
	
| package postgres
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 	"net"
 | |
| 
 | |
| 	"golang.org/x/net/proxy"
 | |
| )
 | |
| 
 | |
| type PgxDialFunc = func(ctx context.Context, network string, address string) (net.Conn, error)
 | |
| 
 | |
| func newPgxDialFunc(dialer proxy.Dialer) PgxDialFunc {
 | |
| 	dialFunc :=
 | |
| 		func(ctx context.Context, network string, addr string) (net.Conn, error) {
 | |
| 			return dialer.Dial(network, addr)
 | |
| 		}
 | |
| 
 | |
| 	return dialFunc
 | |
| }
 |