Documentation ¶
Index ¶
- func CleanerLoggerProxy(logFile *os.File, level logger.LogLevel) func(cleaner Cleaner) Cleaner
- func SetConfigFilePath(path string)
- func StorageLoggerProxy(logFile *os.File, level logger.LogLevel) func(storage Storage) Storage
- type Cleaner
- type Config
- type GarbageInfo
- type GarbageInfosQueue
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanerLoggerProxy ¶ added in v0.0.7
func SetConfigFilePath ¶
func SetConfigFilePath(path string)
Types ¶
type Cleaner ¶
type Cleaner interface {
Clean() error
}
func NewCleaner ¶
func NewCleanerFromConfig ¶
func NewCleanerFromConfig() Cleaner
func NewCleanerFromConfigWithLogger ¶ added in v0.0.7
type Config ¶
type Config struct { TaskPoolCap int `yaml:"TaskPoolCap"` CleanThreshold int `yaml:"CleanThreshold"` LogDir string `yaml:"LogDir"` FastDfsStoragePath string `yaml:"FastDfsStoragePath"` DBType string `yaml:"DBType"` DatabaseName string `yaml:"DatabaseName"` TableName string `yaml:"TableName"` //Fields []string `yaml:"Fields,flow"` IndexField string `yaml:"IndexField"` Field string `yaml:"Field"` Username string `yaml:"Username"` Password string `yaml:"Password"` IPAddr string `yaml:"IPAddr"` ListenPort uint `yaml:"ListenPort"` Protocol string `yaml:"Protocol"` }
func GetSingletonConfigInstance ¶
func GetSingletonConfigInstance() *Config
type GarbageInfo ¶
type GarbageInfosQueue ¶
type GarbageInfosQueue interface { Size() int Append(info GarbageInfo) Pop() GarbageInfo IsEmpty() bool }
func NewGarbageInfosQueue ¶
func NewGarbageInfosQueue() GarbageInfosQueue
type Storage ¶
type Storage interface { RemoveGarbageInfo(info GarbageInfo) GetAllGarbageInfo() []GarbageInfo }
func NewMySQLStorageFromConfig ¶
func NewMySQLStorageFromConfig() Storage
Click to show internal directories.
Click to hide internal directories.