Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Allenxuxu/ringbuffer
/ functions
Functions
53 in github.com/Allenxuxu/ringbuffer
⨍
Functions
53
◇
Types & classes
4
↓ 60 callers
Method
Length
()
ring_buffer.go:347
↓ 43 callers
Method
free
()
ring_buffer.go:423
↓ 26 callers
Method
Bytes
Bytes 返回所有可读数据,此操作不会移动读指针,仅仅是拷贝全部数据
ring_buffer.go:373
↓ 21 callers
Method
Write
(p []byte)
ring_buffer.go:298
↓ 14 callers
Method
IsFull
()
ring_buffer.go:390
↓ 13 callers
Method
IsEmpty
()
ring_buffer.go:394
↓ 11 callers
Function
New
New 返回一个初始大小为 size 的 RingBuffer
ring_buffer.go:24
↓ 10 callers
Method
Read
(p []byte)
ring_buffer.go:239
↓ 9 callers
Method
VirtualLength
VirtualLength 虚拟长度,虚读后剩余可读数据长度 VirtualXXX 系列配合使用
ring_buffer.go:105
↓ 6 callers
Method
Peek
(len int)
ring_buffer.go:144
↓ 6 callers
Method
Retrieve
(len int)
ring_buffer.go:127
↓ 5 callers
Method
Capacity
()
ring_buffer.go:362
↓ 4 callers
Method
ReadByte
()
ring_buffer.go:281
↓ 4 callers
Method
VirtualRead
VirtualRead 虚读,不移动 read 指针,需要配合 VirtualFlush 和 VirtualRevert 使用 VirtualXXX 系列配合使用
ring_buffer.go:66
↓ 4 callers
Method
WriteByte
(c byte)
ring_buffer.go:330
↓ 4 callers
Function
copyByte
(f, e []byte)
ring_buffer.go:438
↓ 2 callers
Function
GetFromPool
GetFromPool returns an empty byte buffer from the pool. Got byte buffer may be returned to the pool via Put call. This reduces the number of memory a
pool.go:66
↓ 2 callers
Method
PeekAll
()
ring_buffer.go:172
↓ 2 callers
Function
PutInPool
PutInPool returns byte buffer to the pool. ByteBuffer.B mustn't be touched after returning it to the pool. Otherwise data races will occur.
pool.go:85
↓ 2 callers
Method
Reset
()
ring_buffer.go:398
↓ 2 callers
Method
RetrieveAll
()
ring_buffer.go:120
↓ 2 callers
Method
VirtualFlush
VirtualFlush 刷新虚读指针 VirtualXXX 系列配合使用
ring_buffer.go:51
↓ 2 callers
Method
VirtualRevert
VirtualRevert 还原虚读指针 VirtualXXX 系列配合使用
ring_buffer.go:60
↓ 2 callers
Method
makeSpace
(len int)
ring_buffer.go:409
↓ 1 callers
Method
Get
Get returns new byte buffer with zero length. The byte buffer may be returned to the pool via Put after the use in order to minimize GC overhead.
pool.go:72
↓ 1 callers
Function
NewWithData
NewWithData 特殊场景使用,RingBuffer 会持有data,不会自己申请内存去拷贝
ring_buffer.go:33
↓ 1 callers
Method
PeekUint16
()
ring_buffer.go:200
↓ 1 callers
Method
PeekUint32
()
ring_buffer.go:213
↓ 1 callers
Method
PeekUint64
()
ring_buffer.go:226
↓ 1 callers
Method
PeekUint8
()
ring_buffer.go:187
↓ 1 callers
Method
Put
Put releases byte buffer obtained via Get to the pool. The buffer mustn't be accessed after returning to the pool.
pool.go:90
↓ 1 callers
Method
calibrate
()
pool.go:104
↓ 1 callers
Function
index
(n int)
pool.go:162
Function
BenchmarkRingBuffer_Sync
(b *testing.B)
ring_buffer_benchmark_test.go:8
Function
BenchmarkTestPool
(b *testing.B)
pool_test.go:8
Function
ExampleRingBuffer
()
example_test.go:5
Method
Len
()
pool.go:150
Method
Less
(i, j int)
pool.go:154
Method
String
()
ring_buffer.go:405
Method
Swap
(i, j int)
pool.go:158
Function
TestCopyBytes
(t *testing.T)
ring_buffer_test.go:632
Function
TestNewWithData
(t *testing.T)
ring_buffer_test.go:474
Function
TestPool
(t *testing.T)
pool_test.go:18
Function
TestRingBuffer_ByteInterface
(t *testing.T)
ring_buffer_test.go:329
Function
TestRingBuffer_Bytes
(t *testing.T)
ring_buffer_test.go:642
Function
TestRingBuffer_Peek
(t *testing.T)
ring_buffer_test.go:256
Function
TestRingBuffer_PeekUintXX
(t *testing.T)
ring_buffer_test.go:587
Function
TestRingBuffer_Read
(t *testing.T)
ring_buffer_test.go:177
Function
TestRingBuffer_VirtualXXX
(t *testing.T)
ring_buffer_test.go:526
Function
TestRingBuffer_Write
(t *testing.T)
ring_buffer_test.go:20
Function
TestRingBuffer_interface
(t *testing.T)
ring_buffer_test.go:11
Method
WithData
(data []byte)
ring_buffer.go:40
Method
WriteString
(s string)
ring_buffer.go:366