Documentation ¶
Index ¶
- Constants
- func AddMonitorCollector(collector Collector)
- func CreateMessageId() string
- func DebugOn()
- func GetLocalhostIp() (ip net.IP, err error)
- func Init(domain string, userConfig 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
- type Logger
- type MetricHelper
- type XMLConfig
- type XMLConfigServer
- type XMLConfigServers
Constants ¶
View Source
const ( GoCatVersion = "2.0.0" CatServerVersionV2 = "V2" CatServerVersionV3 = "V3" )
View Source
const ( SUCCESS = "0" ERROR = "-1" FAIL = "fail" )
Variables ¶
This section is empty.
Functions ¶
func DebugOn ¶
func DebugOn()
func GetLocalhostIp ¶
获取本机IP地址, 优先从eth0, em1中取IP, 取不到,则选择默认的IP
func NewCompletedTransactionWithDuration ¶
func NewTransaction ¶
func NewTransaction(mtype, name string) message.Transactor
func Shutdown ¶
func Shutdown()
Types ¶
type Buf ¶
type Collector ¶
type Config ¶
type Config struct { CatServerVersion string // contains filtered or unexported fields }
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
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.