README ¶ count-warner Count warner, when the count greater than limit, it will emit a warn event API w := warner.NewWarner(time.Second, 10) w.ResetOnWarn = true w.On(func(key string, count int) { fmt.Println(key) }) w.Inc("abcd", 1) Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func NewWarner(duration time.Duration, max int) *warner type Count type Listener Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewWarner ¶ func NewWarner(duration time.Duration, max int) *warner NewWarner returns a new warner Types ¶ type Count ¶ type Count struct { // contains filtered or unexported fields } Count count type Listener ¶ type Listener func(key string, count int) Listener warner listener Source Files ¶ View all Source files warner.go Click to show internal directories. Click to hide internal directories.