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
- func GetHWIDForIMSI(networkID, imsi string) (string, error)
- func GetHostnameForHWID(hwid string) (string, error)
- func GetIMSIForSessionID(networkID, sessionID string) (string, error)
- func GetSessionIDForIMSI(networkID, imsi string) (string, error)
- func MapHWIDToHostname(hwid, hostname string) error
- func MapHWIDsToHostnames(hwidToHostname map[string]string) error
- func MapSessionIDsToIMSIs(networkID string, sessionIDToIMSI map[string]string) error
- type DirectoryRecord
Constants ¶
const RecordKeySessionID = "session_id"
const ServiceName = "DIRECTORYD"
Variables ¶
This section is empty.
Functions ¶
func GetHWIDForIMSI ¶
GetHWIDForIMSI returns the HWID mapped to by the IMSI. Primary state, stored in state service.
func GetHostnameForHWID ¶
GetHostnameForHWID returns the hostname mapped to by hardware ID. Derived state, stored in directoryd service.
func GetIMSIForSessionID ¶
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 ¶
GetSessionIDForIMSI returns the session ID mapped to by the IMSI. Primary state, stored in state service.
func MapHWIDToHostname ¶
MapHWIDToHostname maps a single hwid to a hostname. Derived state, stored in directoryd service.
func MapHWIDsToHostnames ¶
MapHWIDsToHostnames maps {hwid -> hostname}. 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. |