Documentation
¶
Overview ¶
Package config is for Configuration for Cloud-Barista's GRPC and provides the required process
Index ¶
- Constants
- func CheckErr(err error, configFile string) error
- func ReplaceEnvPath(str string) string
- type AuthJWTConfig
- type GrpcClientConfig
- type GrpcConfig
- type GrpcServerConfig
- type GrpcServiceList
- type InterceptorsConfig
- type JaegerClientConfig
- type OpentracingConfig
- type Parser
- type PrometheusMetricsConfig
- type TLSConfig
- type UnsupportedVersionError
Constants ¶
const (
// ConfigVersion is for 설정 구조에 대한 버전
ConfigVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func ReplaceEnvPath ¶
ReplaceEnvPath is to $ABC/def ==> /abc/def
Types ¶
type AuthJWTConfig ¶
type AuthJWTConfig struct { JWTKey string `mapstructure:"jwt_key"` JWTToken string `mapstructure:"jwt_token"` }
AuthJWTConfig is for AuthJWT 설정 구조
type GrpcClientConfig ¶
type GrpcClientConfig struct { ServerAddr string `mapstructure:"server_addr"` Timeout time.Duration `mapstructure:"timeout"` TLS *TLSConfig `mapstructure:"tls"` Interceptors *InterceptorsConfig `mapstructure:"interceptors"` }
GrpcClientConfig is for CB-GRPC 클라이언트 설정 구조
type GrpcConfig ¶
type GrpcConfig struct { Version int `mapstructure:"version"` GSL GrpcServiceList `mapstructure:"grpc"` }
GrpcConfig is for CB-GRPC 서비스 설정 구조
type GrpcServerConfig ¶
type GrpcServerConfig struct { Addr string `mapstructure:"addr"` Reflection string `mapstructure:"reflection"` TLS *TLSConfig `mapstructure:"tls"` Interceptors *InterceptorsConfig `mapstructure:"interceptors"` }
GrpcServerConfig is for CB-GRPC 서버 설정 구조
type GrpcServiceList ¶
type GrpcServiceList struct { TumblebugSrv *GrpcServerConfig `mapstructure:"tumblebugsrv"` SpiderCli *GrpcClientConfig `mapstructure:"spidercli"` TumblebugCli *GrpcClientConfig `mapstructure:"tumblebugcli"` }
GrpcServiceList is for CB-GRPC 서비스 목록
type InterceptorsConfig ¶
type InterceptorsConfig struct { AuthJWT *AuthJWTConfig `mapstructure:"auth_jwt"` PrometheusMetrics *PrometheusMetricsConfig `mapstructure:"prometheus_metrics"` Opentracing *OpentracingConfig `mapstructure:"opentracing"` }
InterceptorsConfig is for GRPC 인터셉터 설정 구조
type JaegerClientConfig ¶
type JaegerClientConfig struct { Endpoint string `mapstructure:"endpoint"` ServiceName string `mapstructure:"service_name"` SampleRate float64 `mapstructure:"sample_rate"` }
JaegerClientConfig is for Jaeger Client 설정 구조
type OpentracingConfig ¶
type OpentracingConfig struct {
Jaeger *JaegerClientConfig `mapstructure:"jaeger"`
}
OpentracingConfig is for Opentracing 설정 구조
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is for Viper lib를 활용하기 위한 Parser 정의 구조 형식
type PrometheusMetricsConfig ¶
type PrometheusMetricsConfig struct {
ListenPort int `mapstructure:"listen_port"`
}
PrometheusMetricsConfig is for Prometheus Metrics 설정 구조
type TLSConfig ¶
type TLSConfig struct { TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` TLSCA string `mapstructure:"tls_ca"` }
TLSConfig is for TLS 설정 구조
type UnsupportedVersionError ¶
UnsupportedVersionError is for 설정 초기화 과정에서 버전 검증을 통해 반환할 오류 구조
func (*UnsupportedVersionError) Error ¶
func (u *UnsupportedVersionError) Error() string
Error is to 비 호환 버전에 대한 오류 문자열 반환