Documentation ¶
Overview ¶
Package walk allows callers to walk the cache folders for various reasons.
Index ¶
- Variables
- func ForEveryFileInFolder(path string, forEvery ForEveryFunc, vP any) error
- func GetCacheItem(chain string, testMode bool, cT CacheType, cacheInfo *CacheFileInfo) (map[string]any, error)
- func GetRootPathFromCacheType(chain string, cacheType CacheType) string
- func IsCacheType(path string, cT CacheType, checkExt bool) bool
- func WalkCacheFolder(ctx context.Context, chain string, cacheType CacheType, data interface{}, ...)
- func WalkCacheName(ct CacheType) string
- func WalkConfigFolders(ctx context.Context, data interface{}, filenameChan chan<- CacheFileInfo)
- func WalkFolder(ctx context.Context, path string, data interface{}, ...)
- type CacheFileInfo
- type CacheType
- type CacheWalker
- type ForEveryFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheTypeToFolder = map[CacheType]string{ Cache_NotACache: "unknown", Cache_Abis: "abis", Cache_Monitors: "monitors", Cache_Names: "names", Cache_Tmp: "tmp", Cache_Blocks: "blocks", Cache_Logs: "logs", Cache_Receipts: "receipts", Cache_Results: "results", Cache_Slurps: "slurps", Cache_State: "state", Cache_Statements: "statements", Cache_Tokens: "tokens", Cache_Traces: "traces", Cache_Transactions: "transactions", Cache_Withdrawals: "withdrawals", Index_Bloom: "blooms", Index_Final: "finalized", Index_Ripe: "ripe", Index_Staging: "staging", Index_Unripe: "unripe", Index_Maps: "maps", Config: "config", Regular: "regular", }
CacheTypeToFolder is a map of cache types to the folder name (also, it acts as the mode in chifra status)
Functions ¶
func ForEveryFileInFolder ¶
func ForEveryFileInFolder(path string, forEvery ForEveryFunc, vP any) error
func GetCacheItem ¶
func WalkCacheFolder ¶
func WalkCacheFolder(ctx context.Context, chain string, cacheType CacheType, data interface{}, filenameChan chan<- CacheFileInfo)
func WalkCacheName ¶
func WalkConfigFolders ¶
func WalkConfigFolders(ctx context.Context, data interface{}, filenameChan chan<- CacheFileInfo)
func WalkFolder ¶
func WalkFolder(ctx context.Context, path string, data interface{}, filenameChan chan<- CacheFileInfo)
Types ¶
type CacheFileInfo ¶
type CacheType ¶
type CacheType uint
const ( Cache_NotACache CacheType = iota Cache_Abis Cache_Monitors Cache_Names Cache_Tmp Cache_Blocks Cache_Logs Cache_Receipts Cache_Results Cache_Slurps Cache_State Cache_Statements Cache_Tokens Cache_Traces Cache_Transactions Cache_Withdrawals Index_Bloom Index_Final Index_Ripe Index_Staging Index_Unripe Index_Maps Config Regular )
type CacheWalker ¶
type CacheWalker struct {
// contains filtered or unexported fields
}
func NewCacheWalker ¶
func NewCacheWalker(chain string, testMode bool, maxTests int, visitFunc walkerFunc) CacheWalker
func (*CacheWalker) MaxTests ¶
func (walker *CacheWalker) MaxTests() int
func (*CacheWalker) WalkBloomFilters ¶
func (walker *CacheWalker) WalkBloomFilters(blockNums []base.Blknum) error
func (*CacheWalker) WalkRegularFolder ¶
func (walker *CacheWalker) WalkRegularFolder(path string) error
Click to show internal directories.
Click to hide internal directories.