gosync

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncCounter added in v1.1.16

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

func GetCounter added in v1.1.16

func GetCounter() *SyncCounter

func (*SyncCounter) Get added in v1.1.16

func (counter *SyncCounter) Get() int64

func (*SyncCounter) Increase added in v1.1.16

func (counter *SyncCounter) Increase()

func (*SyncCounter) Reduce added in v1.1.16

func (counter *SyncCounter) Reduce()

type SyncMap

type SyncMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewSyncMap

func NewSyncMap[K comparable, V any]() *SyncMap[K, V]

func (*SyncMap[K, V]) Get

func (sm *SyncMap[K, V]) Get(k K) (V, bool)

func (*SyncMap[K, V]) GetOrDefault added in v1.1.14

func (sm *SyncMap[K, V]) GetOrDefault(k K, defaultv V) V

func (*SyncMap[K, V]) Put

func (sm *SyncMap[K, V]) Put(k K, v V)

func (*SyncMap[K, V]) Remove

func (sm *SyncMap[K, V]) Remove(k K)

type SyncQueue added in v1.1.16

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

func GetQueue added in v1.1.16

func GetQueue() *SyncQueue

func (*SyncQueue) Clear added in v1.1.16

func (queue *SyncQueue) Clear()

func (*SyncQueue) Len added in v1.1.16

func (queue *SyncQueue) Len() int

func (*SyncQueue) Pop added in v1.1.16

func (queue *SyncQueue) Pop() (interface{}, error)

func (*SyncQueue) Push added in v1.1.16

func (queue *SyncQueue) Push(data interface{})

Jump to

Keyboard shortcuts

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