Documentation
¶
Index ¶
- func AppDir() string
- func AppName() string
- func HasIntersection[T comparable](aa []T, bb []T) bool
- func Intersection[T comparable](aa []T, bb []T) []T
- func NewFileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, isDir bool) fs.FileInfo
- func NewVConn() (*VConn, *VConn)
- func RandomString(lenNum int) string
- func Union[T comparable](aa []T, bb []T) []T
- type ExpireCache
- type LinkList
- func (l *LinkList[T]) Add(v T, num int)
- func (l *LinkList[T]) Dequeue()
- func (l *LinkList[T]) Enqueue(v T)
- func (l *LinkList[T]) Get(index int) T
- func (l *LinkList[T]) GetAll() []T
- func (l *LinkList[T]) Pop()
- func (l *LinkList[T]) Push(v T)
- func (l *LinkList[T]) Remove(index int)
- func (l *LinkList[T]) Size() int
- func (l *LinkList[T]) Walk(fn func(v T) bool)
- type Map
- func (c *Map[T]) Clear()
- func (c *Map[T]) Delete(name string)
- func (c *Map[T]) DeleteDirectly(name string)
- func (c *Map[T]) Len() int
- func (c *Map[T]) Load(name string) *T
- func (c *Map[T]) LoadAndDelete(name string) *T
- func (c *Map[T]) LoadAndStore(name string, value *T) *T
- func (c *Map[T]) Map() map[string]*T
- func (c *Map[T]) Range(iterator func(name string, item *T) bool)
- func (c *Map[T]) Store(name string, value *T)
- type Options
- type Pool
- type RingBuffer
- type VConn
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasIntersection ¶
func HasIntersection[T comparable](aa []T, bb []T) bool
func Intersection ¶
func Intersection[T comparable](aa []T, bb []T) []T
func NewFileInfo ¶
func RandomString ¶
func Union ¶
func Union[T comparable](aa []T, bb []T) []T
Types ¶
type ExpireCache ¶
type ExpireCache struct { Timeout int64 // contains filtered or unexported fields }
func (*ExpireCache) Delete ¶
func (c *ExpireCache) Delete(key string)
func (*ExpireCache) Store ¶
func (c *ExpireCache) Store(key string, value any)
type Map ¶
type Map[T any] struct { // contains filtered or unexported fields }
func (*Map[T]) DeleteDirectly ¶
func (*Map[T]) LoadAndDelete ¶
func (*Map[T]) LoadAndStore ¶
type Pool ¶
type RingBuffer ¶
func NewRingBuffer ¶
func NewRingBuffer[T any](size int) *RingBuffer[T]
func (*RingBuffer[T]) Latest ¶
func (r *RingBuffer[T]) Latest() T
func (*RingBuffer[T]) Oldest ¶
func (r *RingBuffer[T]) Oldest() T
func (*RingBuffer[T]) Overwrite ¶
func (r *RingBuffer[T]) Overwrite(v T)
func (*RingBuffer[T]) Read ¶
func (r *RingBuffer[T]) Read() T
func (*RingBuffer[T]) Write ¶
func (r *RingBuffer[T]) Write(value T)
type VConn ¶ added in v0.0.5
type VConn struct { *io.PipeReader *io.PipeWriter }
func (*VConn) RemoteAddr ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.