github.com/TeaOSLab/EdgeNode@v1.3.8/internal/ttlcache/option.go (about) 1 package ttlcache 2 3 type OptionInterface interface { 4 } 5 6 type PiecesOption struct { 7 Count int 8 } 9 10 func NewPiecesOption(count int) *PiecesOption { 11 return &PiecesOption{Count: count} 12 } 13 14 type MaxItemsOption struct { 15 Count int 16 } 17 18 func NewMaxItemsOption(count int) *MaxItemsOption { 19 return &MaxItemsOption{Count: count} 20 }