Documentation ¶
Overview ¶
Package config - 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 ¶
View Source
const (
// ConfigVersion - 설정 구조에 대한 버전
ConfigVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthJWTConfig ¶
type AuthJWTConfig struct { JWTKey string `mapstructure:"jwt_key"` JWTToken string `mapstructure:"jwt_token"` }
AuthJWTConfig - 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 - CB-GRPC 클라이언트 설정 구조
type GrpcConfig ¶
type GrpcConfig struct { Version int `mapstructure:"version"` GSL GrpcServiceList `mapstructure:"grpc"` }
GrpcConfig - CB-GRPC 서비스 설정 구조
type GrpcServerConfig ¶
type GrpcServerConfig struct { Addr string `mapstructure:"addr"` Reflection string `mapstructure:"reflection"` TLS *TLSConfig `mapstructure:"tls"` Interceptors *InterceptorsConfig `mapstructure:"interceptors"` }
GrpcServerConfig - CB-GRPC 서버 설정 구조
type GrpcServiceList ¶
type GrpcServiceList struct { SpiderSrv *GrpcServerConfig `mapstructure:"spidersrv"` SpiderCli *GrpcClientConfig `mapstructure:"spidercli"` }
GrpcServiceList - CB-GRPC 서비스 목록
type InterceptorsConfig ¶
type InterceptorsConfig struct { AuthJWT *AuthJWTConfig `mapstructure:"auth_jwt"` PrometheusMetrics *PrometheusMetricsConfig `mapstructure:"prometheus_metrics"` Opentracing *OpentracingConfig `mapstructure:"opentracing"` }
InterceptorsConfig - GRPC 인터셉터 설정 구조
type JaegerClientConfig ¶
type JaegerClientConfig struct { Endpoint string `mapstructure:"endpoint"` ServiceName string `mapstructure:"service_name"` SampleRate float64 `mapstructure:"sample_rate"` }
JaegerClientConfig - Jaeger Client 설정 구조
type OpentracingConfig ¶
type OpentracingConfig struct {
Jaeger *JaegerClientConfig `mapstructure:"jaeger"`
}
OpentracingConfig - Opentracing 설정 구조
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser - Viper lib를 활용하기 위한 Parser 정의 구조 형식
type PrometheusMetricsConfig ¶
type PrometheusMetricsConfig struct {
ListenPort int `mapstructure:"listen_port"`
}
PrometheusMetricsConfig - Prometheus Metrics 설정 구조
type TLSConfig ¶
type TLSConfig struct { TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` TLSCA string `mapstructure:"tls_ca"` }
TLSConfig - TLS 설정 구조
type UnsupportedVersionError ¶
UnsupportedVersionError - 설정 초기화 과정에서 버전 검증을 통해 반환할 오류 구조
func (*UnsupportedVersionError) Error ¶
func (u *UnsupportedVersionError) Error() string
Error - 비 호환 버전에 대한 오류 문자열 반환
Click to show internal directories.
Click to hide internal directories.