Documentation
¶
Index ¶
- Constants
- Variables
- type Cache
- type RingBuf
- func (rb *RingBuf) Begin() int64
- func (rb *RingBuf) End() int64
- func (rb *RingBuf) EqualAt(p []byte, off int64) bool
- func (rb *RingBuf) Evacuate(off int64, length int) (newOff int64)
- func (rb *RingBuf) ReadAt(p []byte, off int64) (n int, err error)
- func (rb *RingBuf) Size() int64
- func (rb *RingBuf) Skip(length int64)
- func (rb *RingBuf) Write(p []byte) (n int, err error)
- func (rb *RingBuf) WriteAt(p []byte, off int64) (n int, err error)
- type StoppableTimer
- type Timer
Constants ¶
View Source
const ENTRY_HDR_SIZE = 16
View Source
const HASH_ENTRY_SIZE = 16
Variables ¶
View Source
var ErrOutOfRange = errors.New("out of range")
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewCache ¶
NewCache returns a newly initialized cache by size. The cache size will be set to 512KB at minimum.
func NewCacheCustomTimer ¶
NewCacheCustomTimer returns new cache with custom timer.
type StoppableTimer ¶
type StoppableTimer interface {
Timer
// Release resources of the timer, functionality may or may not be affected
// It is not called automatically, so user must call it just once
Stop()
}
Timer that must be stopped.
func NewCachedTimer ¶
func NewCachedTimer() StoppableTimer
Create cached timer and start runtime timer that updates time every second
Click to show internal directories.
Click to hide internal directories.