Documentation
¶
Index ¶
- func SetOption(o *Option)
- type Counter
- func (c *Counter) Expire(ctx context.Context, key string, ttl time.Duration) error
- func (c *Counter) Get(ctx context.Context, key string) (int64, error)
- func (c *Counter) Incr(ctx context.Context, key string, numChain ...int64) (int64, error)
- func (c *Counter) IsExceeded(ctx context.Context, key string, limit int64) (bool, error)
- func (c *Counter) Key(k string) string
- type Opt
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func GetCounter ¶
func GetCounter() *Counter
func NewCounter ¶
func (*Counter) IsExceeded ¶ added in v1.1.61
Click to show internal directories.
Click to hide internal directories.