directoryd

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 14 Imported by: 1

Documentation

Overview

Package directoryd provides an API for interacting with the directory lookup service, which manages UE location records.

Primary state

  • reported directly from the relevant device/gateway
  • managed by the state service
  • versioned

Secondary state

  • derived, in the controller, from the primary state or other information
  • managed by the directoryd service (DirectoryLookupServer)
  • non-versioned, with availability and correctness provided on a best-effort basis

Index

Constants

View Source
const RecordKeySessionID = "session_id"
View Source
const ServiceName = "DIRECTORYD"

Variables

This section is empty.

Functions

func GetHWIDForIMSI

func GetHWIDForIMSI(networkID, imsi string) (string, error)

GetHWIDForIMSI returns the HWID mapped to by the IMSI. Primary state, stored in state service.

func GetHostnameForHWID

func GetHostnameForHWID(hwid string) (string, error)

GetHostnameForHWID returns the hostname mapped to by hardware ID. Derived state, stored in directoryd service.

func GetIMSIForSessionID

func GetIMSIForSessionID(networkID, sessionID string) (string, error)

GetIMSIForSessionID returns the IMSI mapped to by session ID. Derived state, stored in directoryd service. NOTE: this mapping is provided on a best-effort basis, meaning

  • a {session ID -> IMSI} mapping may be missing even though the IMSI has a session ID record
  • a {session ID -> IMSI} mapping may be stale

func GetSessionIDForIMSI

func GetSessionIDForIMSI(networkID, imsi string) (string, error)

GetSessionIDForIMSI returns the session ID mapped to by the IMSI. Primary state, stored in state service.

func MapHWIDToHostname

func MapHWIDToHostname(hwid, hostname string) error

MapHWIDToHostname maps a single hwid to a hostname. Derived state, stored in directoryd service.

func MapHWIDsToHostnames

func MapHWIDsToHostnames(hwidToHostname map[string]string) error

MapHWIDsToHostnames maps {hwid -> hostname}. Derived state, stored in directoryd service.

func MapSessionIDsToIMSIs

func MapSessionIDsToIMSIs(networkID string, sessionIDToIMSI map[string]string) error

MapSessionIDsToIMSIs maps {session ID -> IMSI}. Derived state, stored in directoryd service.

Types

type DirectoryRecord

type DirectoryRecord struct {
	LocationHistory []string `json:"location_history"`

	Identifiers map[string]interface{} `json:"identifiers"`
}

func (*DirectoryRecord) GetSessionID

func (m *DirectoryRecord) GetSessionID() (string, error)

GetSessionID returns the session ID stored in the directory record. If no session ID is found, returns empty string.

func (*DirectoryRecord) MarshalBinary

func (m *DirectoryRecord) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DirectoryRecord) UnmarshalBinary

func (m *DirectoryRecord) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DirectoryRecord) Validate

func (m *DirectoryRecord) Validate(formats strfmt.Registry) error

Validate validates this directory record

func (*DirectoryRecord) ValidateModel

func (m *DirectoryRecord) ValidateModel() error

ValidateModel is a wrapper to validate this directory record

Directories

Path Synopsis
Package main implements dual purpose directory service which manages UE location records and provides RPCs to look them up: DirectoryLookupServer & GatewayDirectoryService GatewayDirectoryService RPC can be provided by a local Gateway/Device service as well as the cloud hosted service.
Package main implements dual purpose directory service which manages UE location records and provides RPCs to look them up: DirectoryLookupServer & GatewayDirectoryService GatewayDirectoryService RPC can be provided by a local Gateway/Device service as well as the cloud hosted service.

Jump to

Keyboard shortcuts

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