runtime

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithOSSignalCancellation

func ContextWithOSSignalCancellation() context.Context

ContextWithOSSignalCancellation builds a new Context that cancels itself on os.Interrupt signals.

func SystemContextKeySet

func SystemContextKeySet() propagation.ContextKeySet

SystemContextKeySet returns base keys that identifies the current service.

Types

type StackFrame

type StackFrame struct {
	// The path to the file containing this ProgramCounter
	File string
	// The LineNumber in that file
	LineNumber int
	// The Name of the function that contains this ProgramCounter
	Name string
	// The Package that contains this function
	Package string
	// The underlying ProgramCounter
	ProgramCounter uintptr
}

A StackFrame contains all necessary information about to generate a line in a call stack.

func Stack

func Stack() []StackFrame

Stack produces a stack trace for the current caller.

func (*StackFrame) Func

func (frame *StackFrame) Func() *runtime.Func

Func returns the function that contained this frame.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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