util

package
v0.0.0-...-3e81ccd Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNoDataUser

func GetNoDataUser(pk domain.UserPubKey) domain.User

Types

type LimitMap

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

func NewLimitMap

func NewLimitMap(max int) *LimitMap

func (*LimitMap) Acquire

func (m *LimitMap) Acquire(ctx context.Context, key string)

Acquire

func (*LimitMap) Release

func (m *LimitMap) Release(key string)

Release

type Lock

type Lock[T any] struct {
	// contains filtered or unexported fields
}

func (*Lock[T]) Once

func (l *Lock[T]) Once(f func() *T) *T

Jump to

Keyboard shortcuts

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