集群可以设置WebP策略

This commit is contained in:
刘祥超
2022-04-01 16:20:36 +08:00
parent 6c1514cad7
commit d86f2bc1a4
5 changed files with 702 additions and 296 deletions

View File

@@ -21,6 +21,13 @@ type SizeCapacity struct {
Unit SizeCapacityUnit `json:"unit" yaml:"unit"`
}
func NewSizeCapacity(count int64, unit SizeCapacityUnit) *SizeCapacity {
return &SizeCapacity{
Count: count,
Unit: unit,
}
}
func (this *SizeCapacity) Bytes() int64 {
if this.Count < 0 {
return -1