Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IThreadLocal ¶
type IThreadLocal interface { Clear() Index() int }
type LocalStorage ¶
func (*LocalStorage[T]) Clear ¶
func (ls *LocalStorage[T]) Clear()
func (*LocalStorage[T]) Get ¶
func (ls *LocalStorage[T]) Get() (r T)
func (*LocalStorage[T]) Remove ¶
func (ls *LocalStorage[T]) Remove()
func (*LocalStorage[T]) Set ¶
func (ls *LocalStorage[T]) Set(value T)
type ThreadLocal ¶
type ThreadLocal[T any] struct { LocalStorage[T] // contains filtered or unexported fields }
func NewThreadLocal ¶
func NewThreadLocal[T any](value T) *ThreadLocal[T]
func (*ThreadLocal[T]) Index ¶
func (tl *ThreadLocal[T]) Index() int
type ThreadLocalManager ¶
type ThreadLocalManager struct {
// contains filtered or unexported fields
}
func (*ThreadLocalManager) Add ¶
func (m *ThreadLocalManager) Add(threadLocal IThreadLocal)
func (*ThreadLocalManager) Clear ¶
func (m *ThreadLocalManager) Clear()
func (*ThreadLocalManager) Remove ¶
func (m *ThreadLocalManager) Remove(index int)
func (*ThreadLocalManager) RemoveThreadLocal ¶
func (m *ThreadLocalManager) RemoveThreadLocal(threadLocal IThreadLocal)
Click to show internal directories.
Click to hide internal directories.