Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfigValueAsBool(properties map[string]interface{}, key string) (bool, error)
- func GetConfigValueAsInt(properties map[string]interface{}, key string) (int64, error)
- func GetConfigValueAsString(properties map[string]interface{}, key string) (string, error)
- func GetDefaultConfigFolder() (string, error)
- func Load() error
- func ReplaceConfigdir(s string) (string, error)
- type Authentcation
- type Config
- type HealthCheck
- type LoggingConfig
- type Metrics
- type OpenTracing
- type Secret
- type Version
Constants ¶
View Source
const Servicename = "cel-service"
Variables ¶
View Source
var DefaultConfig = Config{ Port: 8000, Sslport: 8443, ServiceURL: "https://127.0.0.1:8443", SecretFile: "", Apikey: false, HealthCheck: HealthCheck{ Period: 30, }, Logging: LoggingConfig{ Level: "INFO", Filename: "${configdir}/logging.log", }, }
View Source
var File = "${configdir}/service.yaml"
File the config file
Functions ¶
func GetConfigValueAsBool ¶
func GetConfigValueAsInt ¶
func GetConfigValueAsString ¶
func GetDefaultConfigFolder ¶
GetDefaultConfigFolder returning the default configuration folder of the system
func ReplaceConfigdir ¶
Types ¶
type Authentcation ¶
type Config ¶
type Config struct { //port of the http server Port int `yaml:"port"` //port of the https server Sslport int `yaml:"sslport"` // Enable ssl GRPCTSL bool `yaml:"grpctsl"` //port of the http server GRPCPort int `yaml:"grpcport"` //this is the url how to connect to this service from outside ServiceURL string `yaml:"serviceURL"` SecretFile string `yaml:"secretfile"` Apikey bool `yaml:"apikey"` Logging LoggingConfig `yaml:"logging"` HealthCheck HealthCheck `yaml:"healthcheck"` Auth Authentcation `yaml:"auth"` OpenTracing OpenTracing `yaml:"opentracing"` Metrics Metrics `yaml:"metrics"` }
Config our service configuration
type HealthCheck ¶
type HealthCheck struct {
Period int `yaml:"period"`
}
HealthCheck configuration for the health check system
type LoggingConfig ¶
type LoggingConfig struct { Level string `yaml:"level"` Filename string `yaml:"filename"` Gelfurl string `yaml:"gelf-url"` Gelfport int `yaml:"gelf-port"` }
Logging configuration for the gelf logging
type OpenTracing ¶
type Secret ¶
type Secret struct { MongoDB struct { Username string `yaml:"username"` Password string `yaml:"password"` } `yaml:"mongodb"` }
Secret our service configuration
Click to show internal directories.
Click to hide internal directories.