debug

package
v0.0.0-...-e081c89 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package debug provides debugging APIs

Index

Constants

This section is empty.

Variables

View Source
var Enabled bool

Enabled is a flag used for debugging murex code. This can be enabled at startup by a `--debug` flag or during runtime with `debug on`.

Functions

func Dump

func Dump() interface{}

Dump is used for runtime output of the status of various debug modes

func Json

func Json(context string, data interface{})

Json encode an object then write it as a debug message

func Log

func Log(data ...interface{})

Log writes a debug message

Types

type BadMutex

type BadMutex struct{}

BadMutex is only used to test deadlocks and shouldn't be used in release code.

func (*BadMutex) Lock

func (bm *BadMutex) Lock()

Lock is a fake mutex lock used to check deadlocks

func (*BadMutex) Unlock

func (bm *BadMutex) Unlock()

Unlock is a fake mutex Unlock used to check deadlocks

type VLock

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

BadMutex is only used to test deadlocks and shouldn't be used in release code.

func (*VLock) Lock

func (v *VLock) Lock()

Lock is a wrapper around a mutex Lock() to help locate deadlocks

func (*VLock) Unlock

func (v *VLock) Unlock()

Lock is a wrapper around a mutex Unlock() to help locate deadlocks

Jump to

Keyboard shortcuts

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