services

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL