Move vars and comment
This commit is contained in:
		| @@ -8,6 +8,14 @@ import ( | |||||||
| 	"github.com/micro/go-micro/transport" | 	"github.com/micro/go-micro/transport" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | var ( | ||||||
|  | 	// ErrDialTimeout is returned by a call to Dial where the timeout occurs | ||||||
|  | 	ErrDialTimeout = errors.New("dial timeout") | ||||||
|  | 	// DefaultDialTimeout is the dial timeout if none is specified | ||||||
|  | 	DefaultDialTimeout = time.Second * 5 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  |  | ||||||
| // Tunnel creates a gre tunnel on top of the go-micro/transport. | // Tunnel creates a gre tunnel on top of the go-micro/transport. | ||||||
| // It establishes multiple streams using the Micro-Tunnel-Channel header | // It establishes multiple streams using the Micro-Tunnel-Channel header | ||||||
| // and Micro-Tunnel-Session header. The tunnel id is a hash of | // and Micro-Tunnel-Session header. The tunnel id is a hash of | ||||||
| @@ -45,12 +53,6 @@ type Session interface { | |||||||
| 	transport.Socket | 	transport.Socket | ||||||
| } | } | ||||||
|  |  | ||||||
| var ( |  | ||||||
| 	ErrDialTimeout = errors.New("dial timeout") |  | ||||||
|  |  | ||||||
| 	DefaultDialTimeout = time.Second * 5 |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // NewTunnel creates a new tunnel | // NewTunnel creates a new tunnel | ||||||
| func NewTunnel(opts ...Option) Tunnel { | func NewTunnel(opts ...Option) Tunnel { | ||||||
| 	return newTunnel(opts...) | 	return newTunnel(opts...) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user