mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Move vars and comment
This commit is contained in:
parent
a24818ee54
commit
c718b8bf93
@ -8,6 +8,14 @@ import (
|
||||
"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.
|
||||
// It establishes multiple streams using the Micro-Tunnel-Channel header
|
||||
// and Micro-Tunnel-Session header. The tunnel id is a hash of
|
||||
@ -45,12 +53,6 @@ type Session interface {
|
||||
transport.Socket
|
||||
}
|
||||
|
||||
var (
|
||||
ErrDialTimeout = errors.New("dial timeout")
|
||||
|
||||
DefaultDialTimeout = time.Second * 5
|
||||
)
|
||||
|
||||
// NewTunnel creates a new tunnel
|
||||
func NewTunnel(opts ...Option) Tunnel {
|
||||
return newTunnel(opts...)
|
||||
|
Loading…
Reference in New Issue
Block a user