cal

package
v0.0.0-...-9750751 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSuccess       string = "0"
	StatusFatal         string = "1"
	StatusSystemFailure string = "1" // "system failure that lead to a failure in processing"
	StatusError         string = "2"
	StatusInputError    string = "2" // "input errors that lead to failure in processing"
	StatusWarning       string = "3"
	StatusUnknown       string = "U"
)

CAL message Status field values

View Source
const (
	TxnTypeAPI      string = "API"  // root Txn for mid-tier service
	TxnTypeRAPI     string = "RAPI" // root Txn for mid-tier service
	TxnTypeAccept   string = "ACCEPT"
	TxnTypeURL      string = "URL"      // root Txn for web service
	TxnTypeConnect  string = "CONNECT"  // nested Txn: connecting to svc
	TxnTypeSend     string = "SEND"     // nested Txn: sending req to svc
	TxnTypeRecv     string = "RECV"     // nested Txn: reading resp from svc
	TxnTypeCall     string = "CALL"     // nested svc call (CONNECT+SEND+RECV)
	TxnTypeDispatch string = "DISPATCH" // nested Txn: handling request
	TxnTypeClose    string = "CLOSE"
)

some well known TxnType values, but anything is allowed

Variables

This section is empty.

Functions

func AtomicTransaction

func AtomicTransaction(txnType string, name string, status string, duration time.Duration, data []byte)

func CalClient

func CalClient() io.Client

func ConfigDump

func ConfigDump()

func Event

func Event(eventType string, name string, status string, data []byte)

func GetCalDropCount

func GetCalDropCount() uint64

func InitWithConfig

func InitWithConfig(conf *config.Config)

func Initialize

func Initialize(args ...interface{}) (err error)

func IsEnabled

func IsEnabled() bool

func LogAtomicTransaction

func LogAtomicTransaction(txnType, eventName, status string, duration time.Duration, eventData map[string]interface{})

func LogDebug

func LogDebug() bool

func LogError

func LogError() bool

func LogEvent

func LogEvent(eventType, eventName, status string, eventData map[string]interface{})

SendEvent logs an event of eventType with a sub-classification of eventName. The event may optionally contain extra eventData.

func LogInfo

func LogInfo() bool

func LogInfoPercent

func LogInfoPercent() bool

func LogVerbose

func LogVerbose() bool

func LogWarning

func LogWarning() bool

func StateLog

func StateLog(name string, data []byte)

Types

This section is empty.

Directories

Path Synopsis
net
io

Jump to

Keyboard shortcuts

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