Documentation ¶
Index ¶
- Constants
- func AddMonitorCollector(collector Collector)
- func DebugOn()
- func Init(domain string)
- func InitByConfig(cfg *Config)
- func IsEnabled() bool
- func LogError(err error, args ...string)
- func LogErrorWithCategory(err error, category string)
- func LogEvent(mtype, name string, args ...string)
- func LogMetricForCount(name string, args ...int)
- func LogMetricForDuration(name string, duration time.Duration)
- func NewCompletedTransactionWithDuration(mtype, name string, duration time.Duration)
- func NewEvent(mtype, name string) message.Messager
- func NewTransaction(mtype, name string) message.Transactor
- func Shutdown()
- type Buf
- type Collector
- type Config
- func (config *Config) Init(domain string) (err error)
- func (config *Config) InitByConfig(cfg *Config) (err error)
- func (config *Config) SetDomain(domain string) *Config
- func (config *Config) SetEnv(env string) *Config
- func (config *Config) SetHostname(hostname string) *Config
- func (config *Config) SetHttpServerPort(httpServerPort int) *Config
- func (config *Config) SetIp(ip string) *Config
- func (config *Config) SetIpHex(ipHex string) *Config
- type Logger
- type MetricHelper
- type XMLConfig
- type XMLConfigServer
- type XMLConfigServers
Constants ¶
View Source
const ( SUCCESS = "0" ERROR = "-1" FAIL = "fail" )
View Source
const (
GoCatVersion = "2.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func AddMonitorCollector ¶
func AddMonitorCollector(collector Collector)
func InitByConfig ¶
func InitByConfig(cfg *Config)
func LogErrorWithCategory ¶
func LogMetricForCount ¶
func LogMetricForDuration ¶
func NewTransaction ¶
func NewTransaction(mtype, name string) message.Transactor
Types ¶
type Buf ¶
func (*Buf) WriteUInt64 ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) InitByConfig ¶
func (*Config) SetHostname ¶
func (*Config) SetHttpServerPort ¶
type MetricHelper ¶
type MetricHelper interface { AddTag(key, val string) MetricHelper Count(int) Duration(time.Duration) }
func NewMetricHelper ¶
func NewMetricHelper(name string) MetricHelper
type XMLConfig ¶
type XMLConfig struct { Name xml.Name `xml:"config"` Servers XMLConfigServers `xml:"servers"` }
type XMLConfigServer ¶
type XMLConfigServers ¶
type XMLConfigServers struct {
Servers []XMLConfigServer `xml:"server"`
}
Click to show internal directories.
Click to hide internal directories.