cat

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

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 DebugOn

func DebugOn()

func Init

func Init(domain string)

func IsEnabled

func IsEnabled() bool

func LogError

func LogError(err error, args ...string)

func LogErrorWithCategory

func LogErrorWithCategory(err error, category string)

func LogEvent

func LogEvent(mtype, name string, args ...string)

func LogMetricForCount

func LogMetricForCount(name string, args ...int)

func LogMetricForDuration

func LogMetricForDuration(name string, duration time.Duration)

func NewCompletedTransactionWithDuration

func NewCompletedTransactionWithDuration(mtype, name string, duration time.Duration)

func NewEvent

func NewEvent(mtype, name string) message.Messager

func NewTransaction

func NewTransaction(mtype, name string) message.Transactor

func Shutdown

func Shutdown()

Types

type Buf

type Buf struct {
	bytes.Buffer
}

func (*Buf) WriteInt

func (b *Buf) WriteInt(i int) (err error)

func (*Buf) WriteUInt64

func (b *Buf) WriteUInt64(i uint64) (err error)

type Collector

type Collector interface {
	GetId() string
	GetDesc() string
	GetProperties() map[string]string
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

func (*Config) Init

func (config *Config) Init(domain string) (err error)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string, args ...interface{})

func (*Logger) Warning

func (l *Logger) Warning(format string, args ...interface{})

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 XMLConfigServer struct {
	Host string `xml:"ip,attr"`
	Port int    `xml:"port,attr"`
}

type XMLConfigServers

type XMLConfigServers struct {
	Servers []XMLConfigServer `xml:"server"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL