cdn_cache_folder

package
v0.0.0-...-12b7791 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CacheFileFolder = "files"
View Source
const SpaceHolderFolder = "spaceholder"

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type CdnCacheFolder

type CdnCacheFolder struct {
	Abs_path           string //absolute folder path of the root folder
	Cache_provide_size int64  //size cdn cache can use in byte
	Cache_used_size    int64  //size cdn cache used in byte
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *CdnCacheFolder

func (*CdnCacheFolder) AddCacheUsedSize

func (cf *CdnCacheFolder) AddCacheUsedSize(size int64)

func (*CdnCacheFolder) CheckFolder

func (cf *CdnCacheFolder) CheckFolder(checkLimitGB int) error

func (*CdnCacheFolder) GetCacheFileSaveFolderPath

func (cf *CdnCacheFolder) GetCacheFileSaveFolderPath() string

func (*CdnCacheFolder) GetFreeSize

func (cf *CdnCacheFolder) GetFreeSize() int64

func (*CdnCacheFolder) GetMesonCacheUsedSize

func (cf *CdnCacheFolder) GetMesonCacheUsedSize() int64

func (*CdnCacheFolder) ReduceCacheUsedSize

func (cf *CdnCacheFolder) ReduceCacheUsedSize(size int64)

func (*CdnCacheFolder) SetCacheUsedSize

func (cf *CdnCacheFolder) SetCacheUsedSize(size int64)

func (*CdnCacheFolder) SyncCacheFolderSize

func (cf *CdnCacheFolder) SyncCacheFolderSize()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL