const AppName = "p2pfaas-scheduler"
const AppVersion = "0.3.0b"
const AppVersionCommit = "xxx"
const ConfigurationFilePath = "/config"
const ConfigurationFileName = "p2p_faas-scheduler.json"
const ConfigurationSchedulerFileName = "p2p_faas-scheduler-config.json"
const DataPath = "/data"
const DefaultDataPath = "/data"
const DefaultFunctionsRunningMax = 10
const DefaultListeningPort = 18080
const DefaultOpenFaaSListeningHost = "faas_containers-openfaas-swarm"
const DefaultOpenFaaSListeningPort = 8080
const DefaultQueueLengthMax = 100
const DefaultRunningEnvironment = RunningEnvironmentProduction
const DefaultServiceDiscoveryListeningHost = "discovery"
const DefaultServiceDiscoveryListeningPort = 19000
const DefaultServiceLearningListeningHost = "learner"
const DefaultServiceLearningListeningPort = 19020
const EnvDataPath = "P2PFAAS_DATA_PATH"
const EnvFunctionsList = "P2PFAAS_FNS_LIST"
const EnvOpenFaasEnabled = "P2PFAAS_OPENFAAS_ENABLED"
const EnvOpenFaasListeningHost = "P2PFAAS_OPENFAAS_HOST"
const EnvOpenFaasListeningPort = "P2PFAAS_OPENFAAS_PORT"
const EnvProfiling = "P2PFAAS_PROF"
env
const EnvRunningEnvironment = "P2PFAAS_DEV_ENV"
const EnvServiceDiscoveryListeningHost = "P2PFAAS_SERVICE_DISCOVERY_HOST"
const EnvServiceDiscoveryListeningPort = "P2PFAAS_SERVICE_DISCOVERY_PORT"
const EnvServiceLearningListeningHost = "P2PFAAS_SERVICE_LEARNING_HOST"
const EnvServiceLearningListeningPort = "P2PFAAS_SERVICE_LEARNING_PORT"
const RunningEnvironmentDevelopment = "development"
const RunningEnvironmentProduction = "production"
const UserAgentMachine = "Machine"
var OpenFaaSPassword = "admin"
var OpenFaaSUsername = "admin"
func CreateDataFolder() error
func GetConfigFilePath() string
func GetConfigSchedulerFilePath() string
func GetDataPath() string
func GetFunctionsList() []string
GetFunctionsList is currently unused!
func GetListeningPort() uint
func GetOpenFaasEnabled() bool
func GetOpenFaasListeningHost() string
func GetOpenFaasListeningPort() uint
func GetQueueEnabled() bool
func GetQueueLengthMax() uint
func GetRunningEnvironment() string
func GetRunningFunctionMax() uint
func GetServiceDiscoveryListeningHost() string
func GetServiceDiscoveryListeningPort() uint
func GetServiceLearningListeningHost() string
func GetServiceLearningListeningPort() uint
func InitConfigurationDynamic()
InitConfigurationDynamic prepare the configuration object, returns if config is read from file
func InitConfigurationStatic()
InitConfigurationStatic prepares and inits the static configuration by loading it from env vars.
func IsConfigurationDynamicReadFromFile() bool
func IsRunningEnvironmentDevelopment() bool
func SaveConfigurationDynamicToConfigFile() error
func SaveConfigurationSchedulerToConfigFile(descriptor *types.SchedulerDescriptor) error
func SetQueueEnabled(b bool)
func SetQueueLengthMax(n uint)
func SetRunningFunctionMax(n uint)
func Start()
type ConfigError struct{}
func (ConfigError) Error() string
type ConfigurationDynamic struct { ParallelRunningFunctionsMax uint `json:"parallel_running_functions_max" bson:"parallel_running_functions_max"` QueueLengthMax uint `json:"queue_length_max" bson:"queue_length_max"` QueueEnabled bool `json:"queue_enabled" bson:"queue_enabled"` }
func GetConfigurationDynamicCopy() *ConfigurationDynamic
func GetDefaultConfigurationDynamic() *ConfigurationDynamic
GetDefaultConfigurationDynamic returns the dynamic configuration object with default values
func ReadConfigurationDynamicFromFile() (*ConfigurationDynamic, error)
ReadConfigurationDynamicFromFile reads the configuration from a file
type ConfigurationStatic struct {
// contains filtered or unexported fields
}
func GetDefaultConfigurationStatic() *ConfigurationStatic
GetDefaultConfigurationStatic returns the static configuration object with default values