nsm

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConnection

type ClientConnection interface {
	GetID() string
	GetConnectionSource() *connection.Connection
	GetConnectionDestination() *connection.Connection
	GetNetworkService() string
}

ClientConnection is an interface for client connection

type HealState

type HealState int32

HealState - keep the cause of healing process

const (
	// HealStateDstDown is a case when destination is down: we need to restore it and re-program local Forwarder.
	HealStateDstDown HealState = 1
	// HealStateSrcDown is a case when source is down: most probable will not happen yet.
	HealStateSrcDown HealState = 2
	// HealStateForwarderDown is a case when local Forwarder is down: we need to heal NSE/Remote NSM and local Forwarder.
	HealStateForwarderDown HealState = 3
	// HealStateDstUpdate is a case when destination is updated: we need to re-program local Forwarder.
	HealStateDstUpdate HealState = 4
	// HealStateDstNmgrDown is a case when destination and/or Remote NSM is down: we need to heal NSE/Remote NSM.
	HealStateDstNmgrDown HealState = 5
)

type MonitorManager

type MonitorManager interface {
	CrossConnectMonitor() crossconnect_monitor.MonitorServer
	LocalConnectionMonitor(workspace string) connectionmonitor.MonitorServer
}

MonitorManager is an interface to provide access to different monitors

type NetworkServiceClient

type NetworkServiceClient interface {
	Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
	Close(ctx context.Context, connection *connection.Connection) error

	Cleanup() error
}

NetworkServiceClient is an interface for network service client

type NetworkServiceEndpointManager

type NetworkServiceEndpointManager interface {
	GetEndpoint(ctx context.Context, requestConnection *connection.Connection, ignoreEndpoints map[registry.EndpointNSMName]*registry.NSERegistration) (*registry.NSERegistration, error)
	CreateNSEClient(ctx context.Context, endpoint *registry.NSERegistration) (NetworkServiceClient, error)
	IsLocalEndpoint(endpoint *registry.NSERegistration) bool
	CheckUpdateNSE(ctx context.Context, reg *registry.NSERegistration) bool
}

NetworkServiceEndpointManager - manages endpoints, TODO: Will be removed in next PRs.

type NetworkServiceHealProcessor

type NetworkServiceHealProcessor interface {
	Heal(ctx context.Context, clientConnection ClientConnection, healState HealState)
	CloseConnection(ctx context.Context, clientConnection ClientConnection) error
}

NetworkServiceHealProcessor - perform Healing operations

type NetworkServiceManager

type NetworkServiceManager interface {
	GetHealProperties() *properties.Properties
	WaitForForwarder(ctx context.Context, duration time.Duration) error
	RemoteConnectionLost(ctx context.Context, clientConnection ClientConnection)
	NotifyRenamedEndpoint(nseOldName, nseNewName string)
	// Getters
	NseManager() NetworkServiceEndpointManager
	SetRemoteServer(server networkservice.NetworkServiceServer)

	Model() model.Model

	NetworkServiceHealProcessor
	ServiceRegistry() serviceregistry.ServiceRegistry
	RestoreConnections(xcons []*crossconnect.CrossConnect, forwarder string, manager MonitorManager)
}

NetworkServiceManager - hold useful nsm structures

type NetworkServiceRequestManager

type NetworkServiceRequestManager interface {
	LocalManager(clientConnection ClientConnection) networkservice.NetworkServiceServer
	RemoteManager() networkservice.NetworkServiceServer
}

NetworkServiceRequestManager - allow to provide local and remote service interfaces.

Jump to

Keyboard shortcuts

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