Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( // EnvKey is a key for looking up the Environment setting in the viper config. EnvKey = "env" // PortKey is a key for looking up the Port setting in the viper config. PortKey = "port" // RestPortKey RestapiPortKey = "restapi_port" // PodNamespaceKey is the key to find the K8S namespace a pod is running in. PodNamespaceKey = "pod.namespace" // PublicNamespaceKey ... PublicNamespaceKey = "public.namespace" // LocalEnv denotes the value for the "local" environment configuration (non-Softlayer) LocalEnv = "local" // 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" LogLevelKey = "loglevel" AK = "" ServiceId = "" LbsEngine = "" PresetModelPath = "" )
Variables ¶
This section is empty.
Functions ¶
func FatalOnAbsentKey ¶
func FatalOnAbsentKey(key string)
FatalOnAbsentKey fails if the key is absent.
func GetCAKey ¶
func GetCAKey() string
GetCAKey gets the CA certificate file name for clients to use
func GetServerCert ¶
func GetServerCert() string
GetServerCert gets the server's TLS certificate file name.
func GetServerPrivateKey ¶
func GetServerPrivateKey() string
GetServerPrivateKey gets the private key file name of the server.
func Initialize ¶
func Initialize()
func IsTLSEnabled ¶
func IsTLSEnabled() bool
IsTLSEnabled is true if the microservices should all use TLS for communiction, otherwise it is false.