First commit. Outline of the default network.

This commit is contained in:
Milos Gajdos
2019-08-20 12:48:51 +01:00
parent 718780367e
commit 6beae23afd
9 changed files with 150 additions and 17 deletions

View File

@@ -8,8 +8,13 @@ import (
"github.com/micro/go-micro/transport"
)
var (
// ErrLinkClosed is returned when attempting i/o operation on the closed link
ErrLinkClosed = errors.New("link closed")
)
// Link is a layer on top of a transport socket with the
// buffering send and recv queue's with the ability to
// buffering send and recv queues with the ability to
// measure the actual transport link and reconnect if
// an address is specified.
type Link interface {
@@ -28,10 +33,6 @@ type Link interface {
Length() int
}
var (
ErrLinkClosed = errors.New("link closed")
)
// NewLink creates a new link on top of a socket
func NewLink(opts ...options.Option) Link {
return newLink(options.NewOptions(opts...))