Add hostname to config

This commit is contained in:
2021-12-04 04:31:19 +01:00
parent 31c3a6740a
commit 6d904c724b
3 changed files with 12 additions and 5 deletions

View File

@@ -16,7 +16,6 @@ import (
)
type Config struct {
LogLevel string `toml:"LogLevel"`
Server *ServerConfig `toml:"Server"`
Client *ClientConfig `toml:"Client"`
location string
@@ -27,8 +26,10 @@ type CertificatePaths struct {
}
type ServerConfig struct {
GRPC *ServerGRPCConfig `toml:"GRPC"`
HTTP *ServerHTTPConfig `toml:"HTTP"`
LogLevel string `toml:"LogLevel"`
Hostname string `toml:"Hostname"`
GRPC *ServerGRPCConfig `toml:"GRPC"`
HTTP *ServerHTTPConfig `toml:"HTTP"`
}
type ServerStoreConfig struct {
Type string `toml:"Type"`
@@ -54,8 +55,8 @@ type ClientConfig struct {
func FromDefault() *Config {
cfg := &Config{
LogLevel: "INFO",
Server: &ServerConfig{
LogLevel: "INFO",
GRPC: &ServerGRPCConfig{
ListenAddr: ":50051",
CACerts: &CertificatePaths{},