Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dial ¶ added in v0.17.60
type Dial interface { GetCtrlId() string GetLinkId() string GetRouterId() string GetAddress() string GetLinkProtocol() string GetRouterVersion() string }
A Dial contains the information need to dial another router
type Factory ¶
type Factory interface { CreateListener(id *identity.TokenId, f Forwarder, config transport.Configuration) (Listener, error) CreateDialer(id *identity.TokenId, f Forwarder, config transport.Configuration) (Dialer, error) }
A Factory creates link listeners and link dialers
type LinkDestination ¶ added in v0.22.26
type Registry ¶ added in v0.17.60
type Registry interface { // GetLink returns the link to the given router, of the given type, if one exists GetLink(routerId, linkType string) (Xlink, bool) // GetLinkById returns the link for the given id, if it exists GetLinkById(linkId string) (Xlink, bool) // GetDialLock tries to acquire a dial lock for the given dial attempt GetDialLock(dial Dial) (Xlink, bool) // DialFailed notifies the registry that a dial failed DialFailed(dial Dial) // DialSucceeded notifies the registry that a dial succeed and provides the resulting link DialSucceeded(link Xlink) (Xlink, bool) // LinkAccepted notifies the registry that a link listener accepted a dial and provides the resulting link LinkAccepted(link Xlink) (Xlink, bool) // LinkClosed notifies the registry that a link closed LinkClosed(link Xlink) // Iter provides a channel which returns all known links Iter() <-chan Xlink // Shutdown frees any resources owned by the registry Shutdown() // DebugForgetLink will remove the link from the registry to inject an error condition DebugForgetLink(linkId string) bool }
Registry contains known link instances and manages link de-duplication
type Xlink ¶
type Xlink interface { LinkDestination Init(metricsRegistry metrics.Registry) error Close() error CloseNotified() error DestinationId() string DestVersion() string LinkProtocol() string DialAddress() string HandleCloseNotification(f func()) IsClosed() bool InspectLink() *inspect.LinkInspectDetail GetAddresses() []*ctrl_pb.LinkConn }
Click to show internal directories.
Click to hide internal directories.