Documentation
¶
Index ¶
- type ReadyGate
- func (gate *ReadyGate) Add()
- func (gate *ReadyGate) Available() int64
- func (gate *ReadyGate) Done()
- func (gate *ReadyGate) Finish(err error, total int64)
- func (gate *ReadyGate) SetAvailable(x int64)
- func (gate *ReadyGate) SetCancel(cancel context.CancelFunc)
- func (gate *ReadyGate) WaitFor(end int64) error
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadyGate ¶
type ReadyGate struct {
Cancel context.CancelFunc
// contains filtered or unexported fields
}
ReadyGate manages blocking cache consumers until the requested data is available.
func NewReadyGate ¶
func NewReadyGate() *ReadyGate
func (*ReadyGate) SetAvailable ¶
func (*ReadyGate) SetCancel ¶
func (gate *ReadyGate) SetCancel(cancel context.CancelFunc)
type Stats ¶
type Stats struct {
CapacityBytes int64
CapacityBytesRemaining int64
MaxFileCount int64
FileCountRemaining int64
FileCount atomic.Int64
ReadBytes atomic.Int64
ReadCount atomic.Int64
SizeBytes atomic.Int64
WriteBytes atomic.Int64
WriteCount atomic.Int64
LoadDuration time.Duration
LruCount int
PinnedCount int
PinnedPaths map[string]int
LruKeys []string
}
Stats maintains statistics about cache usage. In non-debug builds, this type exists but has no methods for retrieving statistics.
func (*Stats) ResetCounters ¶
func (st *Stats) ResetCounters()
ResetCounters sets "counter" type stats to zero.
Click to show internal directories.
Click to hide internal directories.