collector

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTypeCluster      = "cluster"
	LogTypeBucketRotate = "bucket"
)

Variables

View Source
var (
	Enable bool

	LogChunk        nanolog.Handle
	LogEndtoEnd     nanolog.Handle
	LogCluster      nanolog.Handle
	LogBucketRotate nanolog.Handle

	// LogRequestStart Component of LogChunk, fields: cmd, reqId, chunk, startedAt
	LogRequestStart nanolog.Handle = 10001
	// LogRequestValidation Component of LogChunk, fields: validatedAt
	LogRequestValidation nanolog.Handle = 10002
	// LogRequestFuncResponse Component of LogChunk, fields: firstByteReceivedAt, headerReceivedAt, bodyReceivedAt, recoveryFlag
	LogRequestFuncResponse nanolog.Handle = 10003
	// LogRequestProxyResponse Component of LogChunk, fields: headerSentAt, bodySentAt, allSentAt, endedAt
	LogRequestProxyResponse nanolog.Handle = 10004
	// LogRequestAbadon Abandon request log entry.
	LogRequestAbandon nanolog.Handle = 10009

	ErrUnexpectedEntry = errors.New("unexpected log entry")
)

Functions

func Collect

func Collect(handle nanolog.Handle, args ...interface{}) error

func CollectRequest

func CollectRequest(handle nanolog.Handle, e interface{}, args ...interface{}) (interface{}, error)

func Create

func Create(prefix string)

func Flush

func Flush() error

func Stop

func Stop()

Types

type DataEntry

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

Jump to

Keyboard shortcuts

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