list

package
v0.0.0-...-908d4d3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

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

func NewList

func NewList() *List

func (*List) Contain

func (q *List) Contain(v interface{}) bool

func (*List) ContainBy

func (q *List) ContainBy(v interface{}, f func(left interface{}, right interface{}) bool) bool

func (*List) Len

func (q *List) Len() int

func (*List) Pop

func (q *List) Pop() interface{}

func (*List) Push

func (q *List) Push(v interface{})

func (*List) Range

func (q *List) Range(f func(value interface{}))

type RBuffergo

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

func NewRBuffergo

func NewRBuffergo(len int, lock bool) *RBuffergo

func (*RBuffergo) CanRead

func (b *RBuffergo) CanRead(size int) bool

func (*RBuffergo) CanWrite

func (b *RBuffergo) CanWrite(size int) bool

func (*RBuffergo) Capacity

func (b *RBuffergo) Capacity() int

func (*RBuffergo) Clear

func (b *RBuffergo) Clear()

func (*RBuffergo) Empty

func (b *RBuffergo) Empty() bool

func (*RBuffergo) Full

func (b *RBuffergo) Full() bool

func (*RBuffergo) GetBuffer

func (b *RBuffergo) GetBuffer() []byte

func (*RBuffergo) GetReadLineBuffer

func (b *RBuffergo) GetReadLineBuffer() []byte

func (*RBuffergo) GetWriteLineBuffer

func (b *RBuffergo) GetWriteLineBuffer() []byte

func (*RBuffergo) Read

func (b *RBuffergo) Read(data []byte) bool

func (*RBuffergo) Restore

func (b *RBuffergo) Restore()

func (*RBuffergo) Size

func (b *RBuffergo) Size() int

func (*RBuffergo) SkipRead

func (b *RBuffergo) SkipRead(size int)

func (*RBuffergo) SkipWrite

func (b *RBuffergo) SkipWrite(size int)

func (*RBuffergo) Store

func (b *RBuffergo) Store()

func (*RBuffergo) Write

func (b *RBuffergo) Write(data []byte) bool

type ROBuffergo

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

func NewROBuffer

func NewROBuffer(len int, startid int, maxid int) *ROBuffergo

func (*ROBuffergo) Empty

func (b *ROBuffergo) Empty() bool

func (*ROBuffergo) Front

func (b *ROBuffergo) Front() (error, interface{})

func (*ROBuffergo) FrontInter

func (b *ROBuffergo) FrontInter() *ROBuffergoInter

func (*ROBuffergo) Full

func (b *ROBuffergo) Full() bool

func (*ROBuffergo) Get

func (b *ROBuffergo) Get(id int) (error, data interface{})

func (*ROBuffergo) PopFront

func (b *ROBuffergo) PopFront() error

func (*ROBuffergo) Set

func (b *ROBuffergo) Set(id int, data interface{}) error

func (*ROBuffergo) Size

func (b *ROBuffergo) Size() int

type ROBuffergoInter

type ROBuffergoInter struct {
	Value interface{}
	// contains filtered or unexported fields
}

func (*ROBuffergoInter) Next

func (bi *ROBuffergoInter) Next() *ROBuffergoInter

type Req

type Req[V any] struct {
	// contains filtered or unexported fields
}

type ReqQueue

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

TaskQueue 管理请求队列和正在执行的任务

func NewReqQueue

func NewReqQueue[K comparable, V any](requestFunc func(K) (V, error)) *ReqQueue[K, V]

NewTaskQueue 创建一个新的任务队列

func (*ReqQueue[K, V]) GetNewNum

func (q *ReqQueue[K, V]) GetNewNum() int

GetNewNum 获取新任务数量

func (*ReqQueue[K, V]) GetReuseNum

func (q *ReqQueue[K, V]) GetReuseNum() int

GetReuseNum 获取重用任务数量

func (*ReqQueue[K, V]) ResetNewNum

func (q *ReqQueue[K, V]) ResetNewNum()

ResetNewNum 重置新任务数量

func (*ReqQueue[K, V]) ResetReuseNum

func (q *ReqQueue[K, V]) ResetReuseNum()

ResetReuseNum 重置重用任务数量

func (*ReqQueue[K, V]) Submit

func (q *ReqQueue[K, V]) Submit(key K) (V, error)

Submit 提交任务

type Rlistgo

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

func NewRList

func NewRList(len int) *Rlistgo

func (*Rlistgo) Capacity

func (b *Rlistgo) Capacity() int

func (*Rlistgo) Empty

func (b *Rlistgo) Empty() bool

func (*Rlistgo) Front

func (b *Rlistgo) Front() (error, interface{})

func (*Rlistgo) FrontInter

func (b *Rlistgo) FrontInter() *RlistgoInter

func (*Rlistgo) Full

func (b *Rlistgo) Full() bool

func (*Rlistgo) PopFront

func (b *Rlistgo) PopFront() error

func (*Rlistgo) PushBack

func (b *Rlistgo) PushBack(d interface{}) error

func (*Rlistgo) Size

func (b *Rlistgo) Size() int

type RlistgoInter

type RlistgoInter struct {
	Value interface{}
	// contains filtered or unexported fields
}

func (*RlistgoInter) Next

func (bi *RlistgoInter) Next() *RlistgoInter

Jump to

Keyboard shortcuts

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