caller

package
v0.0.0-...-2d970a6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// TestID is used for test.
	TestID ID = "test"
	// TestComponent is used for test.
	TestComponent Component = "test"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component string

Caller component refers to the components within the process.

func GetComponent

func GetComponent(upperLayer int) Component

GetComponent returns the package path of the calling function The argument upperLayer specifies the number of stack frames to ascend. NOTE: This function is time-consuming and please do not use it in high qps scenarios.

type ID

type ID string

Caller ID can be understood as a binary file; it is a process.

func GetCallerID

func GetCallerID() ID

GetCallerID returns the name of the currently running process

Jump to

Keyboard shortcuts

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