stack

package
v0.0.0-...-073654f Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

totally stolen from https://github.com/stvp/rollbar/blob/master/stack.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Filename string  `json:"filename"`
	Method   string  `json:"method"`
	Line     int     `json:"lineno"`
	PC       uintptr `json:"pc"`
}

type Stack

type Stack []*Frame

func BuildStack

func BuildStack(skip int) Stack

func (Stack) Fingerprint

func (s Stack) Fingerprint() string

Create a fingerprint that uniquely identify a given message. We use the full callstack, including file names. That ensure that there are no false duplicates but also means that after changing the code (adding/removing lines), the fingerprints will change. It's a trade-off.

Jump to

Keyboard shortcuts

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