factory

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NRF_EXPECTED_CONFIG_VERSION = "1.0.0"
	NRF_DEFAULT_IPV4            = "127.0.0.10"
	NRF_DEFAULT_PORT            = "8000"
	NRF_DEFAULT_PORT_INT        = 8000
	NRF_DEFAULT_SCHEME          = "https"
	NRF_NFM_RES_URI_PREFIX      = "/nnrf-nfm/v1"
	NRF_DISC_RES_URI_PREFIX     = "/nnrf-disc/v1"
)

Variables

This section is empty.

Functions

func CheckConfigVersion

func CheckConfigVersion() error

func InitConfigFactory

func InitConfigFactory(f string) error

TODO: Support configuration update from REST api

Types

type Config

type Config struct {
	Info          *Info               `yaml:"info"`
	Configuration *Configuration      `yaml:"configuration"`
	Logger        *logger_util.Logger `yaml:"logger"`
}
var NrfConfig Config

func (*Config) GetSbiBindingAddr

func (c *Config) GetSbiBindingAddr() string

func (*Config) GetSbiPort

func (c *Config) GetSbiPort() int

func (*Config) GetSbiRegisterAddr

func (c *Config) GetSbiRegisterAddr() string

func (*Config) GetSbiRegisterIP

func (c *Config) GetSbiRegisterIP() string

func (*Config) GetSbiScheme

func (c *Config) GetSbiScheme() string

func (*Config) GetSbiUri

func (c *Config) GetSbiUri() string

func (*Config) GetVersion

func (c *Config) GetVersion() string

type Configuration

type Configuration struct {
	Sbi             *Sbi          `yaml:"sbi,omitempty"`
	MongoDBName     string        `yaml:"MongoDBName"`
	MongoDBUrl      string        `yaml:"MongoDBUrl"`
	DefaultPlmnId   models.PlmnId `yaml:"DefaultPlmnId"`
	ServiceNameList []string      `yaml:"serviceNameList,omitempty"`
}

type Info

type Info struct {
	Version     string `yaml:"version,omitempty"`
	Description string `yaml:"description,omitempty"`
}

type Sbi

type Sbi struct {
	Scheme       string `yaml:"scheme"`
	RegisterIPv4 string `yaml:"registerIPv4,omitempty"` // IP that is serviced or registered at another NRF.
	// IPv6Addr  string `yaml:"ipv6Addr,omitempty"`
	BindingIPv4 string `yaml:"bindingIPv4,omitempty"` // IP used to run the server in the node.
	Port        int    `yaml:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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