Add a discover ticker, announce on connect and refactor

This commit is contained in:
Asim Aslam
2019-09-05 18:13:02 +01:00
parent 1527a84297
commit ed1faa7a5c
2 changed files with 85 additions and 59 deletions

View File

@@ -9,10 +9,12 @@ import (
)
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
// ErrDialTimeout is returned by a call to Dial where the timeout occurs
ErrDialTimeout = errors.New("dial timeout")
// ErrDiscoverChan is returned when we failed to receive the "announce" back from a discovery
ErrDiscoverChan = errors.New("failed to discover channel")
)
// Tunnel creates a gre tunnel on top of the go-micro/transport.