Documentation ¶
Index ¶
- type Counter
- type DateCounter
- type StandardCounter
- type StandardDateCounter
- func (c *StandardDateCounter) Clear()
- func (c *StandardDateCounter) Dec(count int64)
- func (c *StandardDateCounter) GetLastDaysCount(lastdays int64) []int64
- func (c *StandardDateCounter) Inc(count int64)
- func (c *StandardDateCounter) Snapshot() DateCounter
- func (c *StandardDateCounter) TodayCount() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
func NewCounter ¶
func NewCounter() Counter
type DateCounter ¶
type DateCounter interface { TodayCount() int64 GetLastDaysCount(lastdays int64) []int64 Inc(int64) Dec(int64) Snapshot() DateCounter Clear() }
func NewDateCounter ¶
func NewDateCounter(reserveDays int64) DateCounter
type StandardCounter ¶
type StandardCounter struct {
// contains filtered or unexported fields
}
func (*StandardCounter) Clear ¶
func (c *StandardCounter) Clear()
func (*StandardCounter) Count ¶
func (c *StandardCounter) Count() int64
func (*StandardCounter) Dec ¶
func (c *StandardCounter) Dec(count int64)
func (*StandardCounter) Inc ¶
func (c *StandardCounter) Inc(count int64)
func (*StandardCounter) Snapshot ¶
func (c *StandardCounter) Snapshot() Counter
type StandardDateCounter ¶
type StandardDateCounter struct {
// contains filtered or unexported fields
}
func (*StandardDateCounter) Clear ¶
func (c *StandardDateCounter) Clear()
func (*StandardDateCounter) Dec ¶
func (c *StandardDateCounter) Dec(count int64)
func (*StandardDateCounter) GetLastDaysCount ¶
func (c *StandardDateCounter) GetLastDaysCount(lastdays int64) []int64
func (*StandardDateCounter) Inc ¶
func (c *StandardDateCounter) Inc(count int64)
func (*StandardDateCounter) Snapshot ¶
func (c *StandardDateCounter) Snapshot() DateCounter
func (*StandardDateCounter) TodayCount ¶
func (c *StandardDateCounter) TodayCount() int64
Click to show internal directories.
Click to hide internal directories.