deployment

package
v0.0.0-...-5eadde7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeploymentManager

func NewDeploymentManager(
	subscriberChan chan *edgewatcher.SubscriptionReq,
	cancellationChan chan *edgewatcher.SubscriptionReq,
	statusReader client.Reader,
	statusWriter client.StatusWriter,
	log logr.Logger,
) *deploymentManager

NewDeploymentManager : returns an initialised deploymentManager object

Types

type AMFNode

type AMFNode struct {
	Node
	Spec   AMFSpec
	Status NFStatus
}

type AMFSpec

type AMFSpec struct {
	// contains filtered or unexported fields
}

AMFSpec : Stores the spec related to AMF

type AUSFNode

type AUSFNode struct {
	Node
	Status NFStatus
}

type Deployment

type Deployment struct {
	// contains filtered or unexported fields
}

Deployment : This fundamental module represents a single NFDeploy intent. It is responsible for constructing in-memory graph of NFDeploy and storing spec and status of individual NFs.

func (*Deployment) Init

func (deployment *Deployment) Init(
	statusReader client.Reader,
	statusWriter client.StatusWriter,
	namespacedName NamespacedName,
	logger logr.Logger,
)

Init : This method initialises the deployment

func (*Deployment) ListenSubscriptionStatus

func (deployment *Deployment) ListenSubscriptionStatus()

ListenSubscriptionStatus listens for errors from edgewatcher during subscription creation. In case of no errors, it starts a thread to listen to edge events

func (*Deployment) ReportNFDeployEvent

func (deployment *Deployment) ReportNFDeployEvent(nfDeploy v1alpha1.NfDeploy)

ReportNFDeployEvent := Takes nfDeploy and creates & updates deployment graph structure. It also updates the spec of individual NFs

type DeploymentInfo

type DeploymentInfo struct {
	// contains filtered or unexported fields
}

DeploymentInfo : It contains the information of a single deployment corresponding to a single NfDeploy

type DeploymentManager

type DeploymentManager interface {

	// ReportNFDeployEvent := Any changes in NFDeploy spec are reported to ReportNFDeployEvent.
	// These changes can be addition/update/deletion of any sites or their
	// connectivities in NFDeploy spec.
	// If the deployment corresponding to this NFDeploy is not present in DeploymentSet,
	// ReportNFDeployEvent is responsible for creating new deployment and its
	// subscription for edge events. It also routes the given NFDeploy struct to its
	// corresponding deployment, which syncs the deployment graph with NFDeploy spec.
	// ReportNFDeployEvent is a synchronous method and should be called in a separate
	// thread to prevent blocking on it.
	ReportNFDeployEvent(
		nfdeploy v1alpha1.NfDeploy, namespacedName types.NamespacedName,
	)

	// ReportNFDeployDeleteEvent :=
	// This method cleans up the state maintained for the Deployment, which includes:
	// 1. Terminating routines which are listening for edge events, for the corresponding NFs of the NFDeploy.
	// 2. Removing the data-structure which store the deployment state in DeploymentSet
	// 3. Cancelling edge watcher subscription - edge watcher expects all subscribers to consume all edge events.
	// In case a subscriber does not consume the event, it never leaves edge watcher's event queue,
	// resulting in error.
	ReportNFDeployDeleteEvent(
		nfdeploy v1alpha1.NfDeploy,
	)
}

type DeploymentProcessor

type DeploymentProcessor interface {

	//ReportNFDeployEvent : This method is responsible for changing deployment graph
	//   and specs of individual NFs based on changes in NFDeploy
	ReportNFDeployEvent(nfDeploy v1alpha1.NfDeploy)
}

DeploymentProcessor : DeploymentProcessor modifies Deployment structure using NFDeploy Spec and calculates NF status from events received from EdgeWatcher. Thread-safe.

type DeploymentSet

type DeploymentSet struct {
	// contains filtered or unexported fields
}

DeploymentSet : DeploymentSet stores the address of all deployments in a map data structure A thread-safe set of Deployments

type Edge

type Edge struct {
	FirstNode  string
	SecondNode string
}

func (*Edge) IsEqual

func (e *Edge) IsEqual(firstNode string, secondNode string) bool

type NFStatus

type NFStatus struct {
	// contains filtered or unexported fields
}

type NFType

type NFType string
const (
	UPF               NFType = "upf"
	SMF               NFType = "smf"
	AMF               NFType = "amf"
	UnspecifiedNFType NFType = "unspecified"
)

type Node

type Node struct {
	Id          string
	NFType      NFType
	Connections map[string]void
}

type SMFNode

type SMFNode struct {
	Node
	Spec   SMFSpec
	Status NFStatus
}

type SMFSpec

type SMFSpec struct {
	// contains filtered or unexported fields
}

SMFSpec : Stores the spec related to SMF

type UDMNode

type UDMNode struct {
	Node
	Status NFStatus
}

type UPFNode

type UPFNode struct {
	Node
	Spec   UPFSpec
	Status NFStatus
}

type UPFSpec

type UPFSpec struct {
	// contains filtered or unexported fields
}

UPFSpec : Stores the spec related to UPF

Jump to

Keyboard shortcuts

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