Documentation ¶
Index ¶
- Constants
- func AddMonitorCollector(collector Collector)
- func DebugOn()
- func Init(opts *Options)
- 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 MessageId() string
- func NewCompletedTransactionWithDuration(mtype, name string, duration time.Duration)
- func NewEvent(mtype, name string) message.Messager
- func NewTransaction(mtype, name string) message.Transactor
- func SetChildTraceId(tran message.Transactor, sub message.Transactor)
- func Shutdown()
- type Buf
- type Collector
- type Config
- type Logger
- type MetricHelper
- type Options
- type XMLConfig
- type XMLConfigServer
- type XMLConfigServers
Constants ¶
View Source
const ( SUCCESS = "0" ERROR = "-1" FAIL = "fail" )
View Source
const ( RootId = "X-ROOT-MESSAGE-ID" ParentId = "X-ROOT-PARENT-ID" ChildId = "X-ROOT-CHILD-ID" TypeUrl = "URL" TypeUrlMethod = "URL.method" TypeUrlForward = "URL.Forward" TypeRemoteCall = "RemoteCall" TypeUrlClient = "URL.client" TypeRedis = "REDIS" TypeRedisCmd = "REDIS.cmd" TypeSql = "SQL" TypeSqlOp = "SQL.op" TypeSqlVal = "SQL.val" TypeMQ = "MQ" TypeMQTopic = "MQ.topic" )
View Source
const (
GoCatVersion = "2.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func AddMonitorCollector ¶
func AddMonitorCollector(collector Collector)
func LogErrorWithCategory ¶
func LogMetricForCount ¶
func LogMetricForDuration ¶
func NewTransaction ¶
func NewTransaction(mtype, name string) message.Transactor
func SetChildTraceId ¶
func SetChildTraceId(tran message.Transactor, sub message.Transactor)
Types ¶
type Buf ¶
func (*Buf) WriteUInt64 ¶
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"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.