mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-16 07:46:36 +08:00
优化缓存管理
This commit is contained in:
@@ -2,11 +2,17 @@ package caches
|
||||
|
||||
// 缓存内容写入接口
|
||||
type Writer interface {
|
||||
// 写入数据
|
||||
// 写入Header数据
|
||||
WriteHeader(data []byte) (n int, err error)
|
||||
|
||||
// 写入Body数据
|
||||
Write(data []byte) (n int, err error)
|
||||
|
||||
// 写入的总数据大小
|
||||
Size() int64
|
||||
// 写入的Header数据大小
|
||||
HeaderSize() int64
|
||||
|
||||
// 写入的Body数据大小
|
||||
BodySize() int64
|
||||
|
||||
// 关闭
|
||||
Close() error
|
||||
|
||||
Reference in New Issue
Block a user