internal

Last updated: 2024-11-21 22:05:53.094247 File source: link on GitLab

internal

Table of Contents

Specification

Description

This package contains all code that is very specific to the whole of the dms, which will not be imported by any other packages and used only on the running instance of dms (like config and background task).

Structure and Organisation

Here is quick overview of the contents of this pacakge:

  • README: Current file which is aimed towards developers who wish to use and modify the package functionality.

  • init: This file handles controlled shutdown and initializes OpenTelemetry-based Zap logger.

  • websocket: This file contains communication protocols for a websocket server including message handling and command execution.

subpackages

  • config: This sub-package contains the configuration related data for the whole dms.

  • background_tasks: This sub-package contains functionality that runs in the background.

Class Diagram

Source

internal class diagram

Rendered from source file

!$rootUrlGitlab = "https://gitlab.com/nunet/device-management-service/-/raw/main"
!$packageRelativePath = "/internal"
!$packageUrlGitlab = $rootUrlGitlab + $packageRelativePath
 
!include $packageUrlGitlab/specs/class_diagram.puml

Functionality

TBD

Data Types

  • internal.WebSocketConnection

// WebSocketConnection is pointer to gorilla/websocket.Conn
type WebSocketConnection struct {
	*websocket.Conn
}
  • internal.Command

// Command represents a command to be executed
type Command struct {
	Command string
	NodeID  string // ID of the node where command will be executed
	Result  string
	Conn    *WebSocketConnection
}

Note: The data types are expected to change during refactoring of DMS

Testing

TBD

Proposed Functionality / Requirements

List of issues

All issues that are related to the implementation of internal package can be found below. These include any proposals for modifications to the package or new functionality needed to cover the requirements of other packages.

References

Last updated