func New(allowed uint64, overflow ...func(c *znet.Context)) znet.HandlerFunc {
	r := NewRule()
	f := func(c *znet.Context) {
		c.String(http.StatusTooManyRequests, http.StatusText(http.StatusTooManyRequests))
	}
	if len(overflow) > 0 {
		f = overflow[0]
	}
	r.AddRule(time.Second, int(allowed))
	return func(c *znet.Context) {
		if !r.AllowVisitByIP(c.GetClientIP()) {
			f(c)
			return
		}
		c.Next()
	}
}
New New limiter
package limiter
import (
	"net/http"
	"sort"
	"time"
	"github.com/sohaha/zlsgo/znet"
)
type Rule struct {
	rules []*singleRule
}