Documentation
¶
Index ¶
- Constants
- Variables
- func AddMonitorCollector(collector Collector)
- func DebugOn()
- func Init(domain string)
- func InitWithConfig(domain string, cfg XMLConfig)
- func InitWithLocation(domain, location string)
- 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 NewTransactionWithContext(ctx context.Context, mtype, name string) message.Transactor
- func Shutdown()
- type Buf
- type Collector
- type Config
- type Logger
- type MetricHelper
- type OSInfo
- type XMLConfig
- type XMLConfigServer
- type XMLConfigServers
Constants ¶
View Source
const ( SUCCESS = "0" ERROR = "-1" FAIL = "fail" )
View Source
const ( CatContextRootMessageId = "_catRootMessageId" CatContextParentMessageId = "_catParentMessageId" CatContextChildMessageId = "_catChildMessageId" CatContextClientDomainName = "_catClientDomainName" )
View Source
const (
GoCatVersion = "2.0.0"
)
Variables ¶
View Source
var Manager = catMessageManager{ // contains filtered or unexported fields }
Functions ¶
func AddMonitorCollector ¶
func AddMonitorCollector(collector Collector)
func InitWithConfig ¶ added in v1.2.0
func InitWithLocation ¶ added in v1.2.0
func InitWithLocation(domain, location string)
func LogErrorWithCategory ¶
func LogMetricForCount ¶
func LogMetricForDuration ¶
func NewTransaction ¶
func NewTransaction(mtype, name string) message.Transactor
func NewTransactionWithContext ¶ added in v1.2.0
func NewTransactionWithContext(ctx context.Context, mtype, name string) 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 OSInfo ¶ added in v1.2.0
type OSInfo struct { Name string `xml:"name,attr"` Arch string `xml:"arch,attr"` Version string `xml:"version,attr"` AvailableProcessors string `xml:"available-processors,attr"` SystemLoadAverage string `xml:"system-load-average,attr"` //ProcessTime string `xml:"process-time"` TotalPhysicalMemory string `xml:"total-physical-memory,attr"` FreePhysicalMemory string `xml:"free-physical-memory,attr"` CommittedVirtualMemory string `xml:"committed-virtual-memory,attr"` TotalSwapSpace string `xml:"total-swap-space,attr"` FreeSwapSpace string `xml:"free-swap-space,attr"` }
type XMLConfigServer ¶
type XMLConfigServers ¶
type XMLConfigServers struct {
Servers []XMLConfigServer `xml:"server"`
}
Click to show internal directories.
Click to hide internal directories.