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 { 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 Registry ¶ added in v0.17.60
type Registry interface { xctrl.Xctrl // 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 notifes 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() }
Registry contains known link instances and manages link de-duplication
type Xlink ¶
type Xlink interface { Id() *identity.TokenId SendPayload(payload *xgress.Payload) error SendAcknowledgement(acknowledgement *xgress.Acknowledgement) error SendControl(control *xgress.Control) error Close() error CloseNotified() error DestinationId() string DestVersion() string LinkProtocol() string HandleCloseNotification(f func()) Inspect() map[string]interface{} }
Click to show internal directories.
Click to hide internal directories.