Documentation
¶
Index ¶
Constants ¶
View Source
const ( TCP = "tcp" WEBSOCKET = "ws" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer[T any] struct { // contains filtered or unexported fields }
Buffer represents a buffer of any object
type Container ¶
type Container[Key int | int16 | string, Value any] struct { // contains filtered or unexported fields }
Container represents a safe map
func NewContainer ¶
NewContainer creates a new Container instance
func (*Container[Key, Value]) Del ¶
func (c *Container[Key, Value]) Del(key Key)
Del removes the item from the container
type Provider ¶
type Provider[Object any] interface { Acquire() Object Release(obj Object) }
Provider represents a object provider
func NewSyncPoolProvider ¶
type Schema ¶
Schema represents a protocol specification
type ShardContainer ¶
type ShardContainer[T any] []T
func NewShardContainer ¶
func NewShardContainer[T any](size int, constructor func() T) ShardContainer[T]
func (ShardContainer[T]) GetShard ¶
func (shard ShardContainer[T]) GetShard(num int) T
func (ShardContainer[T]) Iterator ¶
func (shard ShardContainer[T]) Iterator(iterator func(T))
type SyncPoolProvider ¶
type SyncPoolProvider[Object any] struct { // contains filtered or unexported fields }
func (*SyncPoolProvider[Object]) Acquire ¶
func (provider *SyncPoolProvider[Object]) Acquire() Object
func (*SyncPoolProvider[Object]) Release ¶
func (provider *SyncPoolProvider[Object]) Release(obj Object)
Click to show internal directories.
Click to hide internal directories.