Some checks failed
PR Check / check-and-test (pull_request) Failing after 11m4s
- Updated disk_test.go to replace Set and Get with Create and Open methods for better clarity and functionality. - Modified fileinfo.go to include package comment. - Refactored gc.go to streamline garbage collection handling and removed unused statistics. - Updated gc_test.go to comment out large random tests for future implementation. - Enhanced memory.go to implement LRU caching and metrics for memory usage. - Updated memory_test.go to replace Set and Get with Create and Open methods. - Removed sync.go as it was redundant and not utilized. - Updated vfs.go to reflect changes in the VFS interface, replacing Set and Get with Create and Open. - Added package comments to vfserror.go for consistency.
26 lines
408 B
Go
26 lines
408 B
Go
// vfs/cachestate/cachestate.go
|
|
package cachestate
|
|
|
|
import "s1d3sw1ped/SteamCache2/vfs/vfserror"
|
|
|
|
type CacheState int
|
|
|
|
const (
|
|
CacheStateHit CacheState = iota
|
|
CacheStateMiss
|
|
CacheStateNotFound
|
|
)
|
|
|
|
func (c CacheState) String() string {
|
|
switch c {
|
|
case CacheStateHit:
|
|
return "hit"
|
|
case CacheStateMiss:
|
|
return "miss"
|
|
case CacheStateNotFound:
|
|
return "not found"
|
|
}
|
|
|
|
panic(vfserror.ErrUnreachable)
|
|
}
|