stack

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package stack is used for parsing stacks from `runtime.Stack`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

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

Stack represents a single Goroutine's stack.

func All

func All() []Stack

All returns the stacks for all running goroutines.

func Current

func Current() Stack

Current returns the stack for the current goroutine.

func (Stack) FirstFunction

func (s Stack) FirstFunction() string

FirstFunction returns the name of the first function on the stack.

func (Stack) Full

func (s Stack) Full() string

Full returns the full stack trace for this goroutine.

func (Stack) HasFunction added in v1.3.0

func (s Stack) HasFunction(name string) bool

HasFunction reports whether the stack has the given function anywhere in it.

func (Stack) ID

func (s Stack) ID() int

ID returns the goroutine ID.

func (Stack) State

func (s Stack) State() string

State returns the Goroutine's state.

func (Stack) String

func (s Stack) String() string

Jump to

Keyboard shortcuts

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