Documentation
¶
Overview ¶
github.com/whatap/go-api/config
Index ¶
- Variables
- func GetWhatapHome() string
- type ConfGo
- type ConfGoGrpc
- type ConfLogSink
- type ConfNet
- type Config
- func (conf *Config) ApplyConfig(m map[string]string)
- func (conf *Config) GetBoolean(key string, def bool) bool
- func (conf *Config) GetFloat(key string, def float32) float32
- func (conf *Config) GetInt(key string, def int) int32
- func (conf *Config) GetIntSet(key, defaultValue, deli string) []int32
- func (conf *Config) GetLong(key string, def int64) int64
- func (conf *Config) GetStringArray(key string, deli string) []string
- func (conf *Config) GetStringHashCodeSet(key, defaultValue, deli string) []int32
- func (conf *Config) GetStringHashSet(key, defaultValue, deli string) []int32
- func (conf *Config) GetValue(key string) string
- func (conf *Config) GetValueDef(key, def string) string
- func (conf *Config) InArray(str string, list []string) bool
- func (conf *Config) String() string
- func (conf *Config) ToString() string
- type ConfigInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var AppType int16 = 3
Functions ¶
func GetWhatapHome ¶
func GetWhatapHome() string
Types ¶
type ConfGo ¶
type ConfGo struct { GoSqlProfileEnabled bool GoCounterEnabled bool GoCounterInterval int32 GoCounterTimeout int32 }
func (*ConfGo) ApplyDefault ¶
type ConfGoGrpc ¶
type ConfGoGrpc struct { GoGrpcProfileEnabled bool GoGrpcProfileStreamClientEnabled bool GoGrpcProfileStreamServerEnabled bool GoGrpcProfileIgnoreMethod []string GoGrpcProfileStreamMethod []string GoGrpcProfileStreamIdentify bool GoGrpcProfileStreamRate int32 }
func (*ConfGoGrpc) Apply ¶
func (this *ConfGoGrpc) Apply(conf *Config)
func (*ConfGoGrpc) ApplyDefault ¶
func (this *ConfGoGrpc) ApplyDefault(m map[string]string)
type ConfLogSink ¶ added in v0.1.12
type ConfLogSink struct { WatchLogEnabled bool WatchLogCheckInterval int64 WatchLogReadCount int32 WatchLogBufferSize int32 WatchLogLineSize int32 WatchLogSendCount int32 LogSinkEnabled bool LogSinkQueueSize int32 DebugLogSinkEnabled bool LogSinkLineSize int32 DebugLogSinkLineLimit int32 LogSinkZipEnabled bool LogSinkFiles []string LogSinkInterval int32 MaxBufferSize int32 MaxWaitTime int32 LogSinkZipMinSize int32 DebugLogSinkZipEnabled bool LogSinkZipLibpath string }
func (*ConfLogSink) Apply ¶ added in v0.1.12
func (this *ConfLogSink) Apply(conf *Config)
type ConfNet ¶ added in v0.1.12
type ConfNet struct { License string PCODE int64 OID int64 ONAME string OKIND int32 OKIND_NAME string ONODE int32 ONODE_NAME string WhatapHost []string WhatapPort int32 Hosts []string }
func (*ConfNet) ApplyDefault ¶ added in v0.1.12
type Config ¶
type Config struct { PCODE int64 OID int64 OKIND int32 OKIND_NAME string ONODE int32 ONODE_NAME string AppType int16 // private Enabled bool NetUdpHost string NetUdpPort int32 TransactionEnabled bool //profile ProfileSqlParamEnabled bool ProfileSqlCommentEnabled bool ProfileSqlResourceEnabled bool ProfileMethodEnabled bool ProfileMethodStackEnabled bool ProfileHttpHeaderEnabled bool // 수집 유무(HTTP-HEADERS) ProfileHttpHeaderUrlPrefix string // 수집 url prefix ProfileHttpParameterEnabled bool // 수집 유무(HTTP-PARAMETERS) ProfileHttpParameterUrlPrefix string // 수집 url prefix TraceUserEnabled bool // TODO: UseridUtil으로 기본값인 whatap cookie설정 해야함. TraceUserUsingIp bool TraceUserHeaderTicket string // TODO: UseridUtil TraceUserHeaderTicketEnabled bool // private TraceUserSetCookie bool TraceUserCookieLimit int32 TraceUserCookieKeys []string // 세션 쿠키 키 이름 별로도 지정. TraceUserUsingType int32 // private TraceHttpClientIpHeaderKeyEnabled bool TraceHttpClientIpHeaderKey string // TODO: getRemoteAddr MtraceEnabled bool MtraceRate int32 TraceMtraceCallerKey string TraceMtraceCalleeKey string TraceMtraceInfoKey string TraceMtracePoidKey string TraceMtraceSpecKey string TraceMtraceSpecKey1 string MtraceSendUrlLength int32 MtraceSpec string MtraceSpecHash int32 TxMaxCount int32 TxDefaultCapacity int32 TxDefaultLoadFactor float32 Debug bool ConfGo ConfGoGrpc // contains filtered or unexported fields }
func (*Config) ApplyConfig ¶
conf.ConfGo.ApplyDefault(m) conf.ConfGoGrpc.ApplyDefault(m) conf.ApplyConfig(m) }
func (*Config) GetStringArray ¶
func (*Config) GetStringHashCodeSet ¶
func (*Config) GetStringHashSet ¶
func (*Config) GetValueDef ¶
type ConfigInterface ¶ added in v0.1.9
type ConfigInterface interface {
ApplyConfig(*Config)
}
Click to show internal directories.
Click to hide internal directories.