Documentation ¶
Index ¶
- type ClientConnectionManager
- func (m *ClientConnectionManager) CleanupDeletedConnections()
- func (m *ClientConnectionManager) DestinationDown(ctx context.Context, cc nsm.ClientConnection, nsmdDie bool)
- func (m *ClientConnectionManager) ForwarderDown(ctx context.Context, forwarder *model.Forwarder)
- func (m *ClientConnectionManager) GetClientConnectionByLocalDst(dstID string) *model.ClientConnection
- func (m *ClientConnectionManager) GetClientConnectionByRemote(nsm *registry.NetworkServiceManager) []*model.ClientConnection
- func (m *ClientConnectionManager) GetClientConnectionByRemoteDst(dstID, remoteName string) *model.ClientConnection
- func (m *ClientConnectionManager) GetClientConnectionBySource(networkServiceManagerName string) []*model.ClientConnection
- func (m *ClientConnectionManager) GetClientConnectionByXcon(xcon *crossconnect.CrossConnect) *model.ClientConnection
- func (m *ClientConnectionManager) GetClientConnectionsByForwarder(name string) []*model.ClientConnection
- func (m *ClientConnectionManager) GetNsmName() string
- func (m *ClientConnectionManager) LocalDestinationUpdated(ctx context.Context, cc *model.ClientConnection, ...)
- func (m *ClientConnectionManager) MarkConnectionAdded(clientConnection *model.ClientConnection)
- func (m *ClientConnectionManager) MarkConnectionDeleted(clientConnection *model.ClientConnection)
- func (m *ClientConnectionManager) MarkConnectionUpdated(clientConnection *model.ClientConnection)
- func (m *ClientConnectionManager) RemoteDestinationUpdated(ctx context.Context, cc *model.ClientConnection, ...)
- func (m *ClientConnectionManager) UpdateFromInitialState(xcons []*crossconnect.CrossConnect, forwarder *model.Forwarder, ...)
- func (m *ClientConnectionManager) UpdateRemoteMonitorDone(networkServiceManagers []*connection.PathSegment)
- func (m *ClientConnectionManager) UpdateXcon(ctx context.Context, cc nsm.ClientConnection, ...)
- func (m *ClientConnectionManager) WaitPendingConnections(ctx context.Context, id, remoteName string) (*model.ClientConnection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConnectionManager ¶
type ClientConnectionManager struct {
// contains filtered or unexported fields
}
func NewClientConnectionManager ¶
func NewClientConnectionManager(model model.Model, manager nsm.NetworkServiceManager, serviceRegistry serviceregistry.ServiceRegistry) *ClientConnectionManager
func (*ClientConnectionManager) CleanupDeletedConnections ¶
func (m *ClientConnectionManager) CleanupDeletedConnections()
CleanupDeletedConnections - cleanup deleted connections if timeout passed.
func (*ClientConnectionManager) DestinationDown ¶
func (m *ClientConnectionManager) DestinationDown(ctx context.Context, cc nsm.ClientConnection, nsmdDie bool)
DestinationDown handles case when destination down
func (*ClientConnectionManager) ForwarderDown ¶
func (m *ClientConnectionManager) ForwarderDown(ctx context.Context, forwarder *model.Forwarder)
ForwarderDown handles case of local dp down
func (*ClientConnectionManager) GetClientConnectionByLocalDst ¶
func (m *ClientConnectionManager) GetClientConnectionByLocalDst(dstID string) *model.ClientConnection
GetClientConnectionByLocalDst returns a ClientConnection with `Xcon.GetLocalDestination().GetID() == dstID` or `null` if there is no such connection
func (*ClientConnectionManager) GetClientConnectionByRemote ¶
func (m *ClientConnectionManager) GetClientConnectionByRemote(nsm *registry.NetworkServiceManager) []*model.ClientConnection
GetClientConnectionByRemote - return client conndction by remote name
func (*ClientConnectionManager) GetClientConnectionByRemoteDst ¶
func (m *ClientConnectionManager) GetClientConnectionByRemoteDst(dstID, remoteName string) *model.ClientConnection
GetClientConnectionByRemoteDst returns a ClientConnection with `Xcon.GetRemoteDestination().GetId() == dstID` or `null` if there is no such connection
func (*ClientConnectionManager) GetClientConnectionBySource ¶
func (m *ClientConnectionManager) GetClientConnectionBySource(networkServiceManagerName string) []*model.ClientConnection
GetClientConnectionBySource - return client connection by source networkservice manager name
func (*ClientConnectionManager) GetClientConnectionByXcon ¶
func (m *ClientConnectionManager) GetClientConnectionByXcon(xcon *crossconnect.CrossConnect) *model.ClientConnection
GetClientConnectionByXcon - Since cross connect is ours, we could always use local connection id to identify client connection.
func (*ClientConnectionManager) GetClientConnectionsByForwarder ¶
func (m *ClientConnectionManager) GetClientConnectionsByForwarder(name string) []*model.ClientConnection
func (*ClientConnectionManager) GetNsmName ¶
func (m *ClientConnectionManager) GetNsmName() string
func (*ClientConnectionManager) LocalDestinationUpdated ¶
func (m *ClientConnectionManager) LocalDestinationUpdated(ctx context.Context, cc *model.ClientConnection, localDst *connection.Connection)
LocalDestinationUpdated handles case when local connection parameters changed
func (*ClientConnectionManager) MarkConnectionAdded ¶
func (m *ClientConnectionManager) MarkConnectionAdded(clientConnection *model.ClientConnection)
MarkConnectionAdded - remember we have connection to send events from.
func (*ClientConnectionManager) MarkConnectionDeleted ¶
func (m *ClientConnectionManager) MarkConnectionDeleted(clientConnection *model.ClientConnection)
MarkConnectionDeleted - put connection into map of deleted connections.
func (*ClientConnectionManager) MarkConnectionUpdated ¶
func (m *ClientConnectionManager) MarkConnectionUpdated(clientConnection *model.ClientConnection)
MarkConnectionUpdated - put connection into map of deleted connections.
func (*ClientConnectionManager) RemoteDestinationUpdated ¶
func (m *ClientConnectionManager) RemoteDestinationUpdated(ctx context.Context, cc *model.ClientConnection, remoteDst *connection.Connection)
RemoteDestinationUpdated handles case when remote connection parameters changed
func (*ClientConnectionManager) UpdateFromInitialState ¶
func (m *ClientConnectionManager) UpdateFromInitialState(xcons []*crossconnect.CrossConnect, forwarder *model.Forwarder, manager nsm.MonitorManager)
UpdateFromInitialState - restore from forwarder init state request
func (*ClientConnectionManager) UpdateRemoteMonitorDone ¶
func (m *ClientConnectionManager) UpdateRemoteMonitorDone(networkServiceManagers []*connection.PathSegment)
UpdateRemoteMonitorDone - update remote monitor connection lost
func (*ClientConnectionManager) UpdateXcon ¶
func (m *ClientConnectionManager) UpdateXcon(ctx context.Context, cc nsm.ClientConnection, newXcon *crossconnect.CrossConnect)
UpdateXcon handles case when xcon has been changed for NSMClientConnection
func (*ClientConnectionManager) WaitPendingConnections ¶
func (m *ClientConnectionManager) WaitPendingConnections(ctx context.Context, id, remoteName string) (*model.ClientConnection, error)
WaitPendingConnections returns a ClientConnection with `Xcon.GetRemoteDestination().GetId() == dstID` or `null` if there is no such connection, before return it will wait