Documentation ¶
Index ¶
- Constants
- Variables
- type BroadcastingPool
- type Client
- func (c *Client) Close() error
- func (c *Client) Conn() redis.Conn
- func (c *Client) Delete(keys ...string) error
- func (c *Client) Flush()
- func (c *Client) Get(key string) ([]byte, error)
- func (c *Client) GetEntries(keys []string) ([]Entry, error)
- func (c *Client) GetEntry(key string) (Entry, error)
- func (c *Client) Set(key string, value []byte, expires int) error
- func (c *Client) Stats() Stats
- type Entry
- type Pool
- type PoolOptions
- type Stats
- type TrackingPool
Constants ¶
View Source
const NoExpire = 0
Variables ¶
View Source
var ErrClosed = errors.New("client is closed")
View Source
var ErrTooManyActiveClients = errors.New("too many active clients")
View Source
var Logger = log.New(os.Stdout, "csc ", log.Ldate|log.Lmicroseconds)
Functions ¶
This section is empty.
Types ¶
type BroadcastingPool ¶
type BroadcastingPool struct {
// contains filtered or unexported fields
}
func NewBroadcastingPool ¶
func NewBroadcastingPool(rpool *redis.Pool, opts PoolOptions) (*BroadcastingPool, error)
creates a new broadcasting pool and starts the background jobs
func NewDefaultBroadcastingPool ¶
func NewDefaultBroadcastingPool(opts PoolOptions) (*BroadcastingPool, error)
func (*BroadcastingPool) Close ¶
func (p *BroadcastingPool) Close() error
func (*BroadcastingPool) Flush ¶
func (p *BroadcastingPool) Flush()
func (*BroadcastingPool) Get ¶
func (p *BroadcastingPool) Get() (*Client, error)
func (*BroadcastingPool) Options ¶ added in v0.1.6
func (p *BroadcastingPool) Options() *PoolOptions
func (*BroadcastingPool) Stats ¶
func (p *BroadcastingPool) Stats() Stats
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetEntries ¶ added in v0.1.9
todo(jhamren): if perf needs it, implement this properly with MGET
type Pool ¶ added in v0.1.6
type Pool interface { Get() (*Client, error) Close() error Options() *PoolOptions // contains filtered or unexported methods }
type PoolOptions ¶
type TrackingPool ¶
type TrackingPool struct {
// contains filtered or unexported fields
}
func NewTrackingPool ¶
func NewTrackingPool(opts PoolOptions) *TrackingPool
func (*TrackingPool) Close ¶
func (p *TrackingPool) Close() error
closes connections of all clients in the free list
func (*TrackingPool) Get ¶
func (p *TrackingPool) Get() (*Client, error)
func (*TrackingPool) Options ¶ added in v0.1.6
func (p *TrackingPool) Options() *PoolOptions
Click to show internal directories.
Click to hide internal directories.