Documentation
¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type Config
- func (c *Config) AreMetricsEnabled() bool
- 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) GetMetricsBindingAddr() string
- func (c *Config) GetMetricsBindingIP() string
- func (c *Config) GetMetricsCertKeyPath() string
- func (c *Config) GetMetricsCertPemPath() string
- func (c *Config) GetMetricsNamespace() string
- func (c *Config) GetMetricsPort() int
- func (c *Config) GetMetricsScheme() string
- func (c *Config) GetNfInstanceId() string
- func (c *Config) NFServices() []models.NrfNfManagementNfService
- func (c *Config) NrfCertPem() string
- func (c *Config) NrfUri() string
- func (c *Config) Print()
- func (c *Config) SbiBindingAddr() string
- func (c *Config) SbiBindingIP() string
- func (c *Config) SbiPort() int
- func (c *Config) SbiRegisterAddr() string
- func (c *Config) SbiRegisterIP() string
- func (c *Config) SbiScheme() string
- func (c *Config) SbiUri() string
- func (c *Config) ServiceList() []Service
- func (c *Config) ServiceUri(name string) string
- func (c *Config) SetLogEnable(enable bool)
- func (c *Config) SetLogLevel(level string)
- func (c *Config) SetLogReportCaller(reportCaller bool)
- func (c *Config) Validate() (bool, error)
- func (c *Config) Version() string
- type Configuration
- type Info
- type Logger
- type Metrics
- type Sbi
- type Service
- type Tls
Constants ¶
View Source
const ( ServiceTraffInflu string = "3gpp-traffic-influence" ServicePfdMng string = "3gpp-pfd-management" ServiceNefPfd string = string(models.ServiceName_NNEF_PFDMANAGEMENT) ServiceNefOam string = "nnef-oam" ServiceNefCallback string = "nnef-callback" )
View Source
const ( NefDefaultTLSKeyLogPath = "./log/nefsslkey.log" NefDefaultCertPemPath = "./cert/nef.pem" NefDefaultPrivateKeyPath = "./cert/nef.key" NefDefaultConfigPath = "./config/nefcfg.yaml" NefExpectedConfigVersion = "1.0.1" NefDefaultNfInstanceIdEnvVar = "NEF_NF_INSTANCE_ID" NefSbiDefaultIPv4 = "127.0.0.5" NefSbiDefaultPort = 8000 NefSbiDefaultScheme = "https" NefMetricsDefaultEnabled = false NefMetricsDefaultPort = 9091 NefMetricsDefaultScheme = "https" NefMetricsDefaultNamespace = "free5gc" NefDefaultNrfUri = "https://127.0.0.10:8000" TraffInfluResUriPrefix = "/" + ServiceTraffInflu + "/v1" PfdMngResUriPrefix = "/" + ServicePfdMng + "/v1" NefPfdMngResUriPrefix = "/" + ServiceNefPfd + "/v1" NefOamResUriPrefix = "/" + ServiceNefOam + "/v1" NefCallbackResUriPrefix = "/" + ServiceNefCallback + "/v1" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
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) AreMetricsEnabled ¶ added in v1.2.1
func (*Config) GetCertKeyPath ¶ added in v1.1.0
func (*Config) GetCertPemPath ¶ added in v1.1.0
func (*Config) GetLogEnable ¶
func (*Config) GetLogLevel ¶
func (*Config) GetLogReportCaller ¶
func (*Config) GetMetricsBindingAddr ¶ added in v1.2.1
func (*Config) GetMetricsBindingIP ¶ added in v1.2.1
func (*Config) GetMetricsCertKeyPath ¶ added in v1.2.1
func (*Config) GetMetricsCertPemPath ¶ added in v1.2.1
func (*Config) GetMetricsNamespace ¶ added in v1.2.1
func (*Config) GetMetricsPort ¶ added in v1.2.1
func (*Config) GetMetricsScheme ¶ added in v1.2.1
func (*Config) GetNfInstanceId ¶ added in v1.2.1
func (*Config) NFServices ¶
func (c *Config) NFServices() []models.NrfNfManagementNfService
func (*Config) NrfCertPem ¶
func (*Config) SbiBindingAddr ¶
func (*Config) SbiBindingIP ¶
func (*Config) SbiRegisterAddr ¶
func (*Config) SbiRegisterIP ¶
func (*Config) ServiceList ¶
func (*Config) ServiceUri ¶
func (*Config) SetLogEnable ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogReportCaller ¶
type Configuration ¶
type Configuration struct {
NfInstanceId string `yaml:"nfInstanceId,omitempty" valid:"optional,uuidv4"`
Sbi *Sbi `yaml:"sbi,omitempty" valid:"required"`
Metrics *Metrics `yaml:"metrics,omitempty" valid:"optional"`
NrfUri string `yaml:"nrfUri,omitempty" valid:"required"`
NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"`
ServiceList []Service `yaml:"serviceList,omitempty" valid:"required"`
}
type Metrics ¶ added in v1.2.1
type Metrics struct {
Enable bool `yaml:"enable" valid:"optional"`
Scheme string `yaml:"scheme" valid:"required,scheme"`
BindingIPv4 string `yaml:"bindingIPv4,omitempty" valid:"required,host"` // IP used to run the server in the node.
Port int `yaml:"port,omitempty" valid:"optional,port"`
Tls *Tls `yaml:"tls,omitempty" valid:"optional"`
Namespace string `yaml:"namespace" valid:"optional"`
}
type Sbi ¶
type Sbi struct {
Scheme string `yaml:"scheme" valid:"scheme,required"`
RegisterIPv4 string `yaml:"registerIPv4,omitempty" valid:"host,required"` // 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"`
Tls *Tls `yaml:"tls,omitempty" valid:"optional"`
}
Click to show internal directories.
Click to hide internal directories.