aruntime

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 11 Imported by: 7

README

aruntime - aah framework

Build Status codecov Go Report Card Version GoDoc License

v0.3.1 released and tagged on Jul 22, 2018

Runtime library is built to get, manipulate GoRoutines stack trace, etc.

aruntime developed for aah framework. However, it's an independent library, can be used separately with any Go language project. Feel free to use it.

Installation

Stable Version - Production Ready
# install the library
go get -u aahframework.org/aruntime.v0

Visit official website https://aahframework.org to learn more.

Documentation

Index

Constants

View Source
const Version = "0.3.1"

Version no. of aah framework aruntime library

Variables

This section is empty.

Functions

This section is empty.

Types

type GoRoutine

type GoRoutine struct {
	Header     string
	MaxFuncLen int
	MaxPkgLen  int
	HasPanic   bool
	PanicIndex int
	Packages   []string
	Functions  []string
	LineNo     []string
}

GoRoutine holds information of single Go routine stack trace.

type Stacktrace

type Stacktrace struct {
	Raw          string
	Recover      interface{}
	IsParsed     bool
	StripSrcBase bool
	GoRoutines   []*GoRoutine
}

Stacktrace holds the parse information of `debug.Stack()`. It's easier to debug and understand.

func NewStacktrace

func NewStacktrace(r interface{}, appCfg *config.Config) *Stacktrace

NewStacktrace method collects debug stack information and parsing them into easy understanding and returns the instance.

func (*Stacktrace) Parse

func (st *Stacktrace) Parse()

Parse method parses the go debug stacktrace into easy to understand.

func (*Stacktrace) Print

func (st *Stacktrace) Print(w io.Writer)

Print method prints the stack trace info to io.Writer.

Jump to

Keyboard shortcuts

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