debug

package
v0.0.0-...-ebf3c7b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package debug provides utilities for debugging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RWMutexStackBufferLength

func RWMutexStackBufferLength() int

RWMutexStackBufferLength returns the length of the RWMutex stack buffer

func SetRWMutexStackBufferLength

func SetRWMutexStackBufferLength(value int)

SetRWMutexStackBufferLength sets the length of the RWMutex stack buffer

Types

type RWMutex

type RWMutex struct {
	Name   string
	Log    log.Logger
	Writer io.Writer
	// contains filtered or unexported fields
}

RWMutex is a debug wrapper for sync.RWMutex

func (*RWMutex) Lock

func (m *RWMutex) Lock()

Lock the mutex for writing

func (*RWMutex) RLock

func (m *RWMutex) RLock()

RLock the mutex for reading

func (*RWMutex) RLocker

func (m *RWMutex) RLocker() sync.Locker

RLocker returns a Locker interface that implements the Lock and Unlock methods by calling rw.RLock and rw.RUnlock.

func (*RWMutex) RUnlock

func (m *RWMutex) RUnlock()

RUnlock the mutex for reading

func (*RWMutex) Report

func (m *RWMutex) Report()

Report reports the state of the RWMutex

func (*RWMutex) ReportEvery

func (m *RWMutex) ReportEvery(interval time.Duration) close.SimpleCloser

ReportEvery will report the state of the RWMutex at a regular interval

func (*RWMutex) Unlock

func (m *RWMutex) Unlock()

Unlock the mutex for writing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳