mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-02-04 10:35:50 +08:00
集群可以设置WebP策略
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user