utils

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MutexMap

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

MutexMap provides a locking mechanism based on provided name

func NewMutexMap

func NewMutexMap() *MutexMap

NewMutexMap creates a new MutexMap

func (*MutexMap) Lock

func (m *MutexMap) Lock(name string) *sync.RWMutex

Lock locks a mutex with the given name.

func (*MutexMap) RLock

func (m *MutexMap) RLock(name string) *sync.RWMutex

func (*MutexMap) RUnlock

func (m *MutexMap) RUnlock(name string, mutex *sync.RWMutex)

func (*MutexMap) Unlock

func (m *MutexMap) Unlock(name string, mutex *sync.RWMutex)

Unlock unlocks a mutex with the given name.

Jump to

Keyboard shortcuts

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