tracer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = &Handler{callback: make([]func(ctx Context), 0, 2)}

DefaultHandler 默認跟蹤器

Functions

This section is empty.

Types

type Context

type Context struct {
	//ID  調用ID
	ID string
	//Func 函數名稱
	Func string
	//Before 進入時間
	Before time.Time
	//After  退出時間
	After time.Time

	ElapsedTime time.Duration
}

Context 跟蹤上下文

type Handler

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

Handler 函數調用跟蹤器

func (*Handler) After

func (t *Handler) After(ctx *aop.Context)

After 執行後

func (*Handler) Before

func (t *Handler) Before(ctx *aop.Context) error

Before 執行前

func (*Handler) OnInvoked

func (t *Handler) OnInvoked(callback func(ctx Context))

OnInvoked 函數調用跟蹤結束

Jump to

Keyboard shortcuts

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