use yaml tag instead of ocisConfig
This commit is contained in:
@@ -8,17 +8,17 @@ import (
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
||||
*shared.Commons `yaml:"-"`
|
||||
|
||||
Service Service `ocisConfig:"-" yaml:"-"`
|
||||
Service Service `yaml:"-"`
|
||||
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `yaml:"tracing"`
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
GRPC GRPC `yaml:"grpc"`
|
||||
|
||||
Datapath string `ocisConfig:"data_path" env:"STORE_DATA_PATH"`
|
||||
Datapath string `yaml:"data_path" env:"STORE_DATA_PATH"`
|
||||
|
||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package config
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string `ocisConfig:"addr" env:"STORE_DEBUG_ADDR"`
|
||||
Token string `ocisConfig:"token" env:"STORE_DEBUG_TOKEN"`
|
||||
Pprof bool `ocisConfig:"pprof" env:"STORE_DEBUG_PPROF"`
|
||||
Zpages bool `ocisConfig:"zpages" env:"STORE_DEBUG_ZPAGES"`
|
||||
Addr string `yaml:"addr" env:"STORE_DEBUG_ADDR"`
|
||||
Token string `yaml:"token" env:"STORE_DEBUG_TOKEN"`
|
||||
Pprof bool `yaml:"pprof" env:"STORE_DEBUG_PPROF"`
|
||||
Zpages bool `yaml:"zpages" env:"STORE_DEBUG_ZPAGES"`
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ package config
|
||||
|
||||
// GRPC defines the available grpc configuration.
|
||||
type GRPC struct {
|
||||
Addr string `ocisConfig:"addr" env:"STORE_GRPC_ADDR"`
|
||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
||||
Addr string `yaml:"addr" env:"STORE_GRPC_ADDR"`
|
||||
Namespace string `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string `ocisConfig:"-" yaml:"-"`
|
||||
Name string `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package config
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
type Tracing struct {
|
||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;STORE_TRACING_ENABLED"`
|
||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;STORE_TRACING_TYPE"`
|
||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORE_TRACING_ENDPOINT"`
|
||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;STORE_TRACING_COLLECTOR"`
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORE_TRACING_ENABLED"`
|
||||
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORE_TRACING_TYPE"`
|
||||
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORE_TRACING_ENDPOINT"`
|
||||
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORE_TRACING_COLLECTOR"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user