maputils

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncCounterMap

type SyncCounterMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SyncCounterMap : map for keeping locks on structures

func NewSyncCounterMap

func NewSyncCounterMap() *SyncCounterMap

NewSyncCounterMap : create a new sync map

func (*SyncCounterMap) DecreaseCounter

func (sm *SyncCounterMap) DecreaseCounter(k string) (int, error)

DecreaseCounter :

func (*SyncCounterMap) Get

func (sm *SyncCounterMap) Get(k string) (int, bool)

Get : get a lock

func (*SyncCounterMap) Set

func (sm *SyncCounterMap) Set(k string, v int)

Set : create a lock

Jump to

Keyboard shortcuts

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