redisrl

package
v0.0.0-...-20dc802 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2016 License: BSD-3-Clause Imports: 1 Imported by: 46

Documentation

Overview

Package redisrl is a redis client wrapper for rate limiting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a redis client wrapper suitable for rate limiting.

func New

func New(rc *redis.Client) *Client

New creates and initializes a new Client.

func (*Client) Hit

func (c *Client) Hit(key string, ttlsec int32) (count uint64, remttl int32, err error)

Hit implements the httprl.Backend interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL