internal

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCertDirectory = iota + common.ErrLast
	ErrResolveHost
	ErrCreateLogsDir
	ErrCreateLogFile
	ErrStartServer
	ErrMulticastGroup
	ErrGames
)

Variables

This section is empty.

Functions

func Bind

func Bind[D any](r *http.Request, data *D) error

func JSON

func JSON(w *http.ResponseWriter, data any)

func RawJSON

func RawJSON(w *http.ResponseWriter, data []byte)

func WithRng added in v1.7.2

func WithRng(action func(rand *rand.Rand))

Types

type A

type A []any

type CustomWriter

type CustomWriter struct {
	OriginalWriter *os.File
}

func (*CustomWriter) Write

func (cw *CustomWriter) Write(p []byte) (n int, err error)

type H

type H map[string]any

type KeyRWMutex

type KeyRWMutex[K comparable] struct {
	// contains filtered or unexported fields
}

func NewKeyRWMutex

func NewKeyRWMutex[K comparable]() *KeyRWMutex[K]

func (*KeyRWMutex[K]) Lock

func (kl *KeyRWMutex[K]) Lock(key K)

func (*KeyRWMutex[K]) RLock

func (kl *KeyRWMutex[K]) RLock(key K)

func (*KeyRWMutex[K]) RUnlock

func (kl *KeyRWMutex[K]) RUnlock(key K)

func (*KeyRWMutex[K]) Unlock

func (kl *KeyRWMutex[K]) Unlock(key K)

type ReadOnlyOrderedMap added in v1.7.2

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

func NewReadOnlyOrderedMap added in v1.7.2

func NewReadOnlyOrderedMap[K comparable, V any](keyOrder []K, mapping map[K]V) *ReadOnlyOrderedMap[K, V]

func (*ReadOnlyOrderedMap[K, V]) Iter added in v1.7.2

func (m *ReadOnlyOrderedMap[K, V]) Iter() iter.Seq2[K, V]

func (*ReadOnlyOrderedMap[K, V]) Len added in v1.7.2

func (m *ReadOnlyOrderedMap[K, V]) Len() int

func (*ReadOnlyOrderedMap[K, V]) Load added in v1.7.2

func (m *ReadOnlyOrderedMap[K, V]) Load(key K) (value V, ok bool)

func (*ReadOnlyOrderedMap[K, V]) Values added in v1.7.2

func (m *ReadOnlyOrderedMap[K, V]) Values() iter.Seq[V]

type SafeMap

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

func NewSafeMap

func NewSafeMap[K comparable, V any]() *SafeMap[K, V]

func (*SafeMap[K, V]) CompareAndDelete added in v1.7.2

func (m *SafeMap[K, V]) CompareAndDelete(key K, compareFunc func(stored V) bool) (deleted bool)

func (*SafeMap[K, V]) Delete

func (m *SafeMap[K, V]) Delete(key K)

func (*SafeMap[K, V]) Load

func (m *SafeMap[K, V]) Load(key K) (value V, ok bool)

func (*SafeMap[K, V]) LoadOrStore added in v1.7.2

func (m *SafeMap[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)

func (*SafeMap[K, V]) Store

func (m *SafeMap[K, V]) Store(key K, value V, replace func(stored V) bool) (stored V, exists bool)

func (*SafeMap[K, V]) StoreAndDelete added in v1.7.2

func (m *SafeMap[K, V]) StoreAndDelete(storeKey K, storeValue V, deleteKey K)

func (*SafeMap[K, V]) Values added in v1.7.2

func (m *SafeMap[K, V]) Values() iter.Seq[V]

type SafeOrderedMap added in v1.7.2

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

func NewSafeOrderedMap added in v1.7.2

func NewSafeOrderedMap[K comparable, V any]() *SafeOrderedMap[K, V]

func (*SafeOrderedMap[K, V]) Delete added in v1.7.2

func (m *SafeOrderedMap[K, V]) Delete(key K) bool

func (*SafeOrderedMap[K, V]) Iter added in v1.7.2

func (m *SafeOrderedMap[K, V]) Iter() (int, iter.Seq2[K, V])

func (*SafeOrderedMap[K, V]) IterAndStore added in v1.7.2

func (m *SafeOrderedMap[K, V]) IterAndStore(key K, value V, replace func(stored V) bool, fn func(int, iter.Seq2[K, V])) (stored bool, storedValue V)

func (*SafeOrderedMap[K, V]) Keys added in v1.7.2

func (m *SafeOrderedMap[K, V]) Keys() (int, iter.Seq[K])

func (*SafeOrderedMap[K, V]) Len added in v1.7.2

func (m *SafeOrderedMap[K, V]) Len() int

func (*SafeOrderedMap[K, V]) Load added in v1.7.2

func (m *SafeOrderedMap[K, V]) Load(key K) (value V, ok bool)

func (*SafeOrderedMap[K, V]) Store added in v1.7.2

func (m *SafeOrderedMap[K, V]) Store(key K, value V, replace func(stored V) bool) (stored bool, storedValue V)

func (*SafeOrderedMap[K, V]) Values added in v1.7.2

func (m *SafeOrderedMap[K, V]) Values() (int, iter.Seq[V])

type SafeSet

type SafeSet[V comparable] struct {
	// contains filtered or unexported fields
}

func NewSafeSet

func NewSafeSet[V comparable]() *SafeSet[V]

func (*SafeSet[V]) Delete

func (s *SafeSet[V]) Delete(value V) bool

func (*SafeSet[V]) Store added in v1.7.2

func (s *SafeSet[V]) Store(value V) bool

Jump to

Keyboard shortcuts

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