Add hostname to config
This commit is contained in:
@@ -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{},
|
||||
|
Reference in New Issue
Block a user