Documentation
¶
Index ¶
- Constants
- func InitConfigFactory(f string, cfg *Config) error
- type Cgf
- 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) GetSbiBindingAddr() string
- func (c *Config) GetSbiBindingIP() string
- func (c *Config) GetSbiPort() int
- func (c *Config) GetSbiScheme() string
- func (c *Config) GetVersion() 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)
- type Configuration
- type Diameter
- type Info
- type Logger
- type Metrics
- type Mongodb
- type Sbi
- type Service
- type Tls
Constants ¶
View Source
const ( ChfDefaultTLSKeyLogPath = "./log/chfsslkey.log" ChfDefaultTLSPemPath = "./cert/chf.pem" ChfDefaultTLSKeyPath = "./cert/chf.key" ChfDefaultConfigPath = "./config/chfcfg.yaml" ChfSbiDefaultIPv4 = "127.0.0.113" ChfSbiDefaultPort = 8000 ChfSbiDefaultScheme = "https" ChfMetricsDefaultEnabled = false ChfMetricsDefaultPort = 9091 ChfMetricsDefaultScheme = "https" ChfMetricsDefaultNamespace = "free5gc" ChfDefaultNrfUri = "https://127.0.0.10:8000" CgfDefaultCdrFilePath = "/tmp" ConvergedChargingResUriPrefix = "/nchf-convergedcharging/v3" OfflineOnlyChargingResUriPrefix = "/nchf-offlineonlycharging/v1" SpendingLimitControlResUriPrefix = "/nchf-spendinglimitcontrol/v1" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFactory ¶
TODO: Support configuration update from REST api
Types ¶
type Cgf ¶
type Cgf struct {
Enable bool `yaml:"enable,omitempty" valid:"type(bool)"`
HostIPv4 string `yaml:"hostIPv4,omitempty" valid:"required,host"`
Port int `yaml:"port,omitempty" valid:"required,port"`
ListenPort int `yaml:"listenPort,omitempty" valid:"required,port"`
PassiveTransferPortRange struct {
Start int `yaml:"start" valid:"required,port"`
End int `yaml:"end" valid:"required,port"`
} `yaml:"passiveTransferPortRange,omitempty" valid:"optional"`
Tls *Tls `yaml:"tls,omitempty" valid:"optional"`
CdrFilePath string `yaml:"cdrFilePath,omitempty" valid:"optional"`
}
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
}
var ChfConfig *Config
func ReadConfig ¶
func (*Config) AreMetricsEnabled ¶ added in v1.2.0
func (*Config) GetCertKeyPath ¶ added in v1.0.2
func (*Config) GetCertPemPath ¶ added in v1.0.2
func (*Config) GetLogEnable ¶
func (*Config) GetLogLevel ¶
func (*Config) GetLogReportCaller ¶
func (*Config) GetMetricsBindingAddr ¶ added in v1.2.0
func (*Config) GetMetricsBindingIP ¶ added in v1.2.0
func (*Config) GetMetricsCertKeyPath ¶ added in v1.2.0
func (*Config) GetMetricsCertPemPath ¶ added in v1.2.0
func (*Config) GetMetricsNamespace ¶ added in v1.2.0
func (*Config) GetMetricsPort ¶ added in v1.2.0
func (*Config) GetMetricsScheme ¶ added in v1.2.0
func (*Config) GetSbiBindingAddr ¶ added in v1.0.2
func (*Config) GetSbiBindingIP ¶ added in v1.0.2
func (*Config) GetSbiPort ¶ added in v1.0.2
func (*Config) GetSbiScheme ¶ added in v1.0.2
func (*Config) GetVersion ¶
func (*Config) SetLogEnable ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogReportCaller ¶
type Configuration ¶
type Configuration struct {
ChfName string `yaml:"chfName,omitempty" valid:"required, type(string)"`
Sbi *Sbi `yaml:"sbi,omitempty" valid:"required"`
Metrics *Metrics `yaml:"metrics,omitempty" valid:"optional"`
ServiceNameList []string `yaml:"serviceNameList,omitempty" valid:"required"`
NrfUri string `yaml:"nrfUri,omitempty" valid:"required, url"`
NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"`
Mongodb *Mongodb `yaml:"mongodb" valid:"required"`
VolumeLimit int32 `yaml:"volumeLimit,omitempty" valid:"optional"`
VolumeLimitPDU int32 `yaml:"volumeLimitPDU,omitempty" valid:"optional"`
ReserveQuotaRatio int32 `yaml:"reserveQuotaRatio,omitempty" valid:"optional"`
VolumeThresholdRate float32 `yaml:"volumeThresholdRate,omitempty" valid:"optional"`
QuotaValidityTime int32 `yaml:"quotaValidityTime,omitempty" valid:"optional"`
RfDiameter *Diameter `yaml:"rfDiameter,omitempty" valid:"required"`
AbmfDiameter *Diameter `yaml:"abmfDiameter,omitempty" valid:"required"`
Cgf *Cgf `yaml:"cgf,omitempty" valid:"required"`
}
type Metrics ¶ added in v1.2.0
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:"required,scheme"`
RegisterIPv4 string `yaml:"registerIPv4,omitempty" valid:"required,host"` // IP that is registered at NRF.
BindingIPv4 string `yaml:"bindingIPv4,omitempty" valid:"required,host"` // IP used to run the server in the node.
Port int `yaml:"port,omitempty" valid:"required,port"`
Tls *Tls `yaml:"tls,omitempty" valid:"optional"`
}
Click to show internal directories.
Click to hide internal directories.