Documentation
¶
Overview ¶
Package link provides a measured transport.Socket link
Package link provides a measured link on top of a transport.Socket
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrLinkClosed is returned when attempting i/o operation on the closed link ErrLinkClosed = errors.New("link closed") )
Functions ¶
func Address ¶
The address to use for the link. Connect must be called for this to be used, its otherwise unused.
Types ¶
type Link ¶
type Link interface {
// provides the transport.Socket interface
transport.Socket
// Connect connects the link. It must be called first
// if there's an expectation to create a new socket.
Connect() error
// Id of the link is "local" if not specified
Id() string
// Status of the link
Status() string
// Depth of the buffers
Weight() int
// Rate of the link
Length() int
}
Link is a layer on top of a transport socket with the buffering send and recv queues with the ability to measure the actual transport link and reconnect if an address is specified.