Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfigFactory(f string, cfg *Config) error
- func InitRoutingConfigFactory(f string, cfg *RoutingConfig) error
- type Config
- func (c *Config) GetCertKeyPath() string
- func (c *Config) GetCertPemPath() string
- func (c *Config) GetLogEnable() bool
- func (c *Config) GetLogLevel() string
- func (c *Config) GetLogReportCaller() bool
- func (c *Config) GetSbiScheme() string
- func (c *Config) GetVersion() string
- func (c *Config) Print()
- func (c *Config) SetLogEnable(enable bool)
- func (c *Config) SetLogLevel(level string)
- func (c *Config) SetLogReportCaller(reportCaller bool)
- func (c *Config) Validate() (bool, error)
- type Configuration
- type DNS
- type DnnUpfInfoItem
- type Info
- type InterfaceUpfInfoItem
- type Logger
- type PCSCF
- type PFCP
- type Path
- type PfdContent
- type PfdDataForApp
- type PlmnID
- type RouteProfID
- type RouteProfile
- type RoutingConfig
- type Sbi
- type SnssaiDnnInfoItem
- type SnssaiInfoItem
- type SnssaiUpfInfoItem
- type SpecificPath
- type TimerValue
- type Tls
- type UEIPPool
- type UERoutingInfo
- type UPLink
- type UPNode
- type UserPlaneInformation
Constants ¶
View Source
const ( SmfDefaultTLSKeyLogPath = "./log/smfsslkey.log" SmfDefaultCertPemPath = "./cert/smf.pem" SmfDefaultPrivateKeyPath = "./cert/smf.key" SmfDefaultConfigPath = "./config/smfcfg.yaml" SmfDefaultUERoutingPath = "./config/uerouting.yaml" SmfSbiDefaultIPv4 = "127.0.0.2" SmfSbiDefaultPort = 8000 SmfSbiDefaultScheme = "https" SmfDefaultNrfUri = "https://127.0.0.10:8000" SmfEventExposureResUriPrefix = "/nsmf_event-exposure/v1" SmfPdusessionResUriPrefix = "/nsmf-pdusession/v1" SmfOamUriPrefix = "/nsmf-oam/v1" SmfCallbackUriPrefix = "/nsmf-callback" NrfDiscUriPrefix = "/nnrf-disc/v1" UdmSdmUriPrefix = "/nudm-sdm/v1" PcfSmpolicycontrolUriPrefix = "/npcf-smpolicycontrol/v1" UpiUriPrefix = "/upi/v1" )
Variables ¶
View Source
var ( SmfConfig *Config UERoutingConfig *RoutingConfig )
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
func InitRoutingConfigFactory ¶
func InitRoutingConfigFactory(f string, cfg *RoutingConfig) error
Types ¶
type Config ¶
type Config struct { Info *Info `yaml:"info" valid:"required"` Configuration *Configuration `yaml:"configuration" valid:"required"` Logger *Logger `yaml:"logger" valid:"required"` sync.RWMutex }
func ReadConfig ¶
func (*Config) GetCertKeyPath ¶
func (*Config) GetCertPemPath ¶
func (*Config) GetLogEnable ¶
func (*Config) GetLogLevel ¶
func (*Config) GetLogReportCaller ¶
func (*Config) GetSbiScheme ¶
func (*Config) GetVersion ¶
func (*Config) SetLogEnable ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogReportCaller ¶
type Configuration ¶
type Configuration struct { SmfName string `yaml:"smfName" valid:"type(string),required"` Sbi *Sbi `yaml:"sbi" valid:"required"` PFCP *PFCP `yaml:"pfcp" valid:"required"` NrfUri string `yaml:"nrfUri" valid:"url,required"` NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"` UserPlaneInformation UserPlaneInformation `yaml:"userplaneInformation" valid:"required"` ServiceNameList []string `yaml:"serviceNameList" valid:"required"` SNssaiInfo []*SnssaiInfoItem `yaml:"snssaiInfos" valid:"required"` ULCL bool `yaml:"ulcl" valid:"type(bool),optional"` PLMNList []PlmnID `yaml:"plmnList" valid:"optional"` Locality string `yaml:"locality" valid:"type(string),optional"` UrrPeriod uint16 `yaml:"urrPeriod,omitempty" valid:"optional"` UrrThreshold uint64 `yaml:"urrThreshold,omitempty" valid:"optional"` T3591 *TimerValue `yaml:"t3591" valid:"required"` T3592 *TimerValue `yaml:"t3592" valid:"required"` NwInstFqdnEncoding bool `yaml:"nwInstFqdnEncoding" valid:"type(bool),optional"` RequestedUnit int32 `yaml:"requestedUnit,omitempty" valid:"optional"` }
type DnnUpfInfoItem ¶
type DnnUpfInfoItem struct { Dnn string `json:"dnn" yaml:"dnn" valid:"required"` DnaiList []string `json:"dnaiList" yaml:"dnaiList" valid:"optional"` PduSessionTypes []models.PduSessionType `json:"pduSessionTypes" yaml:"pduSessionTypes" valid:"optional"` Pools []*UEIPPool `json:"pools" yaml:"pools" valid:"optional"` StaticPools []*UEIPPool `json:"staticPools" yaml:"staticPools" valid:"optional"` }
type InterfaceUpfInfoItem ¶
type InterfaceUpfInfoItem struct { InterfaceType models.UpInterfaceType `json:"interfaceType" yaml:"interfaceType" valid:"required"` Endpoints []string `json:"endpoints" yaml:"endpoints" valid:"required"` NetworkInstances []string `json:"networkInstances" yaml:"networkInstances" valid:"required"` }
type PFCP ¶
type PFCP struct { ListenAddr string `yaml:"listenAddr,omitempty" valid:"host,required"` ExternalAddr string `yaml:"externalAddr,omitempty" valid:"host,required"` NodeID string `yaml:"nodeID,omitempty" valid:"host,required"` // interval at which PFCP Association Setup error messages are output. AssocFailAlertInterval time.Duration `yaml:"assocFailAlertInterval,omitempty" valid:"type(time.Duration),optional"` AssocFailRetryInterval time.Duration `yaml:"assocFailRetryInterval,omitempty" valid:"type(time.Duration),optional"` HeartbeatInterval time.Duration `yaml:"heartbeatInterval,omitempty" valid:"type(time.Duration),optional"` }
type PfdContent ¶
type PfdContent struct { // Identifies a PFD of an application identifier. PfdID string `yaml:"pfdID,omitempty" valid:"type(string),minstringlength(1),required"` // Represents a 3-tuple with protocol, server ip and server port for // UL/DL application traffic. FlowDescriptions []string `yaml:"flowDescriptions,omitempty" valid:"optional"` // Indicates a URL or a regular expression which is used to match the // significant parts of the URL. Urls []string `yaml:"urls,omitempty" valid:"optional"` // Indicates an FQDN or a regular expression as a domain name matching // criteria. DomainNames []string `yaml:"domainNames,omitempty" valid:"optional"` }
PfdContent represents the flow of the application
type PfdDataForApp ¶
type PfdDataForApp struct { // Identifier of an application. AppID string `yaml:"applicationId" valid:"type(string),minstringlength(1),required"` // PFDs for the application identifier. Pfds []PfdContent `yaml:"pfds" valid:"required"` // Caching time for an application identifier. CachingTime *time.Time `yaml:"cachingTime,omitempty" valid:"optional"` }
PfdDataForApp represents the PFDs for an application identifier
type RouteProfID ¶
type RouteProfID string
RouteProfID is string providing a Route Profile identifier.
type RouteProfile ¶
type RouteProfile struct { // Forwarding Policy ID of the route profile ForwardingPolicyID string `yaml:"forwardingPolicyID,omitempty" valid:"type(string),stringlength(1|255),required"` }
RouteProfile maintains the mapping between RouteProfileID and ForwardingPolicyID of UPF
type RoutingConfig ¶
type RoutingConfig struct { Info *Info `yaml:"info" valid:"required"` UERoutingInfo map[string]UERoutingInfo `yaml:"ueRoutingInfo" valid:"optional"` RouteProf map[RouteProfID]RouteProfile `yaml:"routeProfile,omitempty" valid:"optional"` PfdDatas []*PfdDataForApp `yaml:"pfdDataForApp,omitempty" valid:"optional"` sync.RWMutex }
func ReadUERoutingConfig ¶
func ReadUERoutingConfig(cfgPath string) (*RoutingConfig, error)
func (*RoutingConfig) GetVersion ¶
func (r *RoutingConfig) GetVersion() string
func (*RoutingConfig) Validate ¶
func (r *RoutingConfig) Validate() (bool, error)
type Sbi ¶
type Sbi struct { Scheme string `yaml:"scheme" valid:"scheme,required"` Tls *Tls `yaml:"tls" valid:"optional"` RegisterIPv4 string `yaml:"registerIPv4,omitempty" valid:"host,optional"` // IP that is registered at NRF. // IPv6Addr string `yaml:"ipv6Addr,omitempty"` BindingIPv4 string `yaml:"bindingIPv4,omitempty" valid:"host,required"` // IP used to run the server in the node. Port int `yaml:"port,omitempty" valid:"port,optional"` }
type SnssaiDnnInfoItem ¶
type SnssaiInfoItem ¶
type SnssaiInfoItem struct { SNssai *models.Snssai `yaml:"sNssai" valid:"required"` DnnInfos []*SnssaiDnnInfoItem `yaml:"dnnInfos" valid:"required"` }
type SnssaiUpfInfoItem ¶
type SnssaiUpfInfoItem struct { SNssai *models.Snssai `json:"sNssai" yaml:"sNssai" valid:"required"` DnnUpfInfoList []*DnnUpfInfoItem `json:"dnnUpfInfoList" yaml:"dnnUpfInfoList" valid:"required"` }
type SpecificPath ¶
type TimerValue ¶
type UERoutingInfo ¶
type UERoutingInfo struct { Members []string `yaml:"members" valid:"required"` AN string `yaml:"AN,omitempty" valid:"ipv4,optional"` PathList []Path `yaml:"PathList,omitempty" valid:"optional"` Topology []UPLink `yaml:"topology" valid:"required"` SpecificPaths []SpecificPath `yaml:"specificPath,omitempty" valid:"optional"` }
type UPNode ¶
type UPNode struct { Type string `json:"type" yaml:"type" valid:"upNodeType,required"` NodeID string `json:"nodeID" yaml:"nodeID" valid:"host,optional"` Addr string `json:"addr" yaml:"addr" valid:"host,optional"` ANIP string `json:"anIP" yaml:"anIP" valid:"host,optional"` Dnn string `json:"dnn" yaml:"dnn" valid:"type(string),minstringlength(1),optional"` SNssaiInfos []*SnssaiUpfInfoItem `json:"sNssaiUpfInfos" yaml:"sNssaiUpfInfos,omitempty" valid:"optional"` InterfaceUpfInfoList []*InterfaceUpfInfoItem `json:"interfaces" yaml:"interfaces,omitempty" valid:"optional"` }
UPNode represent the user plane node
type UserPlaneInformation ¶
type UserPlaneInformation struct { UPNodes map[string]*UPNode `json:"upNodes" yaml:"upNodes" valid:"required"` Links []*UPLink `json:"links" yaml:"links" valid:"required"` }
UserPlaneInformation describe core network userplane information
Click to show internal directories.
Click to hide internal directories.