Documentation ¶
Index ¶
- Constants
- func CheckPushGatewayEnabled() bool
- func DisableDNSServer()
- func FatalOnAbsentKey(key string)
- func FatalOnAbsentKeyInMap(key string, conf map[string]string)
- func FatalOnAbsentKeysets(keyset1 []string, keyset2 []string)
- func GetCAKey() string
- func GetCurrentLearnerConfigLocation(name string, version string) string
- func GetCurrentLearnerConfigLocationFromCombination(nameversion string) string
- func GetDataStoreConfig() map[string]string
- func GetDataStoreType() string
- func GetDebugLearnerOptions() string
- func GetDevicePlugin() bool
- func GetEtcdCertLocation() string
- func GetEtcdEndpoints() []string
- func GetEtcdPassword() string
- func GetEtcdPrefix() string
- func GetEtcdUsername() string
- func GetFileContents(filename string) string
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetLearnerKubeCAFile() string
- func GetLearnerKubeCertFile() string
- func GetLearnerKubeKeyFile() string
- func GetLearnerKubeToken() string
- func GetLearnerKubeTokenFile() string
- func GetLearnerKubeURL() string
- func GetLearnerNamespace() string
- func GetLogCollectorMemInMB() int
- func GetLogCollectorMilliCPU() int
- func GetMongoCertLocation() string
- func GetPodName() string
- func GetPodNamespace() string
- func GetPodNamespaceForPrometheus() string
- func GetPushgatewayURL() string
- func GetResourceLimit() int
- func GetResourceLimitQuerySize() int
- func GetServerCert() string
- func GetServerName() string
- func GetServerPrivateKey() string
- func GetString(key string) string
- func GetTrainingDataMemInMB() int
- func GetValue(key string) string
- func GetVolumeSize() int64
- func InitViper()
- func IsTLSEnabled() bool
- func LogStackTrace()
- func SetDefault(key string, value interface{})
Constants ¶
const ( // PortKey is a key for looking up the Port setting in the viper config. PortKey = "port" // ObjectStoreKey is a key for looking up the ObjectStore setting in the viper config. ObjectStoreKey = "objectstore" // LogLevelKey is a key for looking up the LogLevel setting in the viper config. LogLevelKey = "loglevel" // EnvKey is a key for looking up the Environment setting in the viper config. EnvKey = "env" // DNSServerKey is a key for looking up the DNS server setting in the viper config. DNSServerKey = "dns_server" // ETCDEndpoints ... ETCDEndpoints = "etcd.address" //ETCDUsername ... ETCDUsername = "etcd.username" //ETCDPassword ... ETCDPassword = "etcd.password" //ETCDPrefix ... ETCDPrefix = "etcd.prefix" // TLSKey is the config key for looking up whether TLS is enabled. TLSKey = "tls" // ServerCertKey is the config key for the TLS server certificate. ServerCertKey = "server_cert" // ServerPrivateKey is the config key for the TLS server private key. ServerPrivateKey = "server_private_key" // ServerNameKey is the config key for the TLS cert server name. ServerNameKey = "server_name" // CACertKey is the config key for the TLS cert authority. CACertKey = "ca_cert" // DLaaS image tag key is the config key that indicates which DLAAS images to use DLaaSImageTagKey = "image_tag" // ServiceTagKey is the config key that indicates the namespace under which the services are deployed. ServicesTagKey = "image_tag" // LearnerTagKey is the config key that indicates which learner images to use. LearnerTagKey = "learner_tag" // DataBrokerTagKey is the config key that indicates which data broker images to use. DataBrokerTagKey = "databroker_tag" // IBMDockerRegistryKey is the config key for the docker registry to use for hybrid deployments. IBMDockerRegistryKey = "ibm_docker_registry" // LearnerRegistryKey is the config key for the docker registry to use. LearnerRegistryKey = "learner_registry" // LearnerImagePullSecretKey is the config key for docker registry pull secret LearnerImagePullSecretKey = "learner_image_pull_secret" //Use by LCM to know where it is deployed LCMDeploymentKey = "lcm_deployment" // HybridEnv denotes a hybrid deployment on minikube and remote cluster. Used by LCM only HybridEnv = "hybrid" // LocalEnv denotes the value for the "local" environment configuration (non-Softlayer) LocalEnv = "local" // DevelopmentEnv denotes the value for the "development" SL environment configuration DevelopmentEnv = "development" // StagingEnv denotes the value for the "staging" SL environment configuration StagingEnv = "staging" // ProductionEnv denotes the value for the "production" SL environment configuration ProductionEnv = "production" LoggingType = "logging_type" LoggingTypeJson = "json" LoggingTypeText = "text" //PushMetricsEnabled whether push based metrics is enabled PushMetricsEnabled = "push_metrics_enabled" PodName = "pod.name" // PodNamespaceKey is the key to find the K8S namespace a pod is running in. PodNamespaceKey = "pod.namespace" // LearnerNamespaceKey is the key to find the K8S namespace learners are supposed to run in. LearnerKubeNamespaceKey = "learner.kube.namespace" // This is temporary until we support specifying storage requirements in the manifest. VolumeSize = "external_volume_size" // TODO this a duplication with the storage package - needs to align UsernameKey = "user_name" PasswordKey = "password" AuthURLKey = "auth_url" DomainKey = "domain_name" RegionKey = "region" ProjectKey = "project_id" StorageType = "type" DebugLearnerOptions = "learner.debug" // possible value for DebugLearnerOptions // learner pods should not be cleaned up NoCleanup = "nocleanup" DlaasResourceLimit = "resource.limit" DlaasResourceLimitQuerySize = "resource.limit.query.size" // FfDL Change: next 5 lines ImagePullPolicy = "image_pull_policy" )
Variables ¶
This section is empty.
Functions ¶
func CheckPushGatewayEnabled ¶
func CheckPushGatewayEnabled() bool
CheckPushGatewayEnabled ... for sending out metrics
func DisableDNSServer ¶
func DisableDNSServer()
DisableDNSServer disables the DNS server in the global config. This is usefule for testing.
func FatalOnAbsentKey ¶
func FatalOnAbsentKey(key string)
FatalOnAbsentKey fails if the key is absent.
func FatalOnAbsentKeyInMap ¶
FatalOnAbsentKeyInMap fails if the key is absent in the conf map.
func FatalOnAbsentKeysets ¶
FatalOnAbsentKeysets fatals if either set of keys is not set correctly. (i.e., keys of `keyset1` xor `keyset2` are not set)
func GetCAKey ¶
func GetCAKey() string
GetCAKey gets the CA certificate file name for clients to use
func GetDataStoreConfig ¶
GetDataStoreConfig returns the configuration for the internal data store used to store model configuration, trained models, etc. TODO rename this config to data_store later
func GetDataStoreType ¶
func GetDataStoreType() string
GetDataStoreType returns the configuration type for the internal data store.
func GetDebugLearnerOptions ¶
func GetDebugLearnerOptions() string
GetDebugLearnerOptions returns comma separated list of options for debugging learners
func GetDevicePlugin ¶
func GetDevicePlugin() bool
func GetFileContents ¶
Return the contents of a file. Return an empty string if the file doesn't exist or can't be read.
func GetFloat64 ¶
GetFloat64 returns the float64 value for the config key.
func GetLearnerNamespace ¶
func GetLearnerNamespace() string
GetLearnerNamespace gets the namespace where the learners should run.
func GetLogCollectorMemInMB ¶
func GetLogCollectorMemInMB() int
func GetLogCollectorMilliCPU ¶
func GetLogCollectorMilliCPU() int
func GetPodName ¶
func GetPodName() string
func GetPodNamespace ¶
func GetPodNamespace() string
GetPodNamespace gets the namespace of a POD or returns the default one.
func GetPodNamespaceForPrometheus ¶
func GetPodNamespaceForPrometheus() string
func GetServerCert ¶
func GetServerCert() string
GetServerCert gets the server's TLS certificate file name.
func GetServerName ¶
func GetServerName() string
GetServerName gets the server name that is encoded in the TLS certificate.
func GetServerPrivateKey ¶
func GetServerPrivateKey() string
GetServerPrivateKey gets the private key file name of the server.
func GetTrainingDataMemInMB ¶
func GetTrainingDataMemInMB() int
func GetVolumeSize ¶
func GetVolumeSize() int64
GetVolumeSize returns the size (in bytes) of the external volume to use. If 0, don't use an external volume.
func IsTLSEnabled ¶
func IsTLSEnabled() bool
IsTLSEnabled is true if the microservices should all use TLS for communiction, otherwise it is false.
func LogStackTrace ¶
func LogStackTrace()
func SetDefault ¶
func SetDefault(key string, value interface{})
SetDefault sets the default value for the config key.
Types ¶
This section is empty.