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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PCF_DEFAULT_IPV4     = "127.0.0.7"
	PCF_DEFAULT_PORT     = "8000"
	PCF_DEFAULT_PORT_INT = 8000
)
View Source
const (
	PCF_EXPECTED_CONFIG_VERSION = "1.0.0"
)

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 PcfConfig Config

func (*Config) GetVersion

func (c *Config) GetVersion() string

type Configuration

type Configuration struct {
	PcfName         string    `yaml:"pcfName,omitempty"`
	Sbi             *Sbi      `yaml:"sbi,omitempty"`
	TimeFormat      string    `yaml:"timeFormat,omitempty"`
	DefaultBdtRefId string    `yaml:"defaultBdtRefId,omitempty"`
	NrfUri          string    `yaml:"nrfUri,omitempty"`
	ServiceList     []Service `yaml:"serviceList,omitempty"`
	Mongodb         *Mongodb  `yaml:"mongodb"`
}

type Info

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

type Mongodb

type Mongodb struct {
	Name string `yaml:"name"`
	Url  string `yaml:"url"`
}

type Sbi

type Sbi struct {
	Scheme       string `yaml:"scheme"`
	RegisterIPv4 string `yaml:"registerIPv4,omitempty"` // IP that is registered at 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"`
}

type Service

type Service struct {
	ServiceName string `yaml:"serviceName"`
	SuppFeat    string `yaml:"suppFeat,omitempty"`
}

Jump to

Keyboard shortcuts

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