Documentation ¶
Index ¶
- type CassStorage
- func (s *CassStorage) Add(ctx *Context, loc string, m *Pair) error
- func (s *CassStorage) Clear(ctx *Context, loc string) (int64, error)
- func (s *CassStorage) Close(ctx *Context) error
- func (s *CassStorage) Delete(ctx *Context, loc string) error
- func (s *CassStorage) GetStats(ctx *Context, loc string) (StorageStats, error)
- func (s *CassStorage) Health(ctx *Context) error
- func (s *CassStorage) Load(ctx *Context, loc string) ([]Pair, error)
- func (s *CassStorage) Remove(ctx *Context, loc string, k []byte) (int64, error)
- type CassandraDBConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CassStorage ¶
type CassStorage struct {
// contains filtered or unexported fields
}
CassStorage implements Storage using Cassandra.
This name stutters because it's convenient to dot-import core, which defines 'Storage'.
func NewStorage ¶
func NewStorage(ctx *Context, config CassandraDBConfig) (*CassStorage, error)
NewStorage creates new Storage implementation based on Cassandra.
The given Nodes should have the form ADDRESS:PORT, where the PORT is the CQL port (normally 9042, I think).
func (*CassStorage) Add ¶
func (s *CassStorage) Add(ctx *Context, loc string, m *Pair) error
func (*CassStorage) Close ¶
func (s *CassStorage) Close(ctx *Context) error
func (*CassStorage) Delete ¶
func (s *CassStorage) Delete(ctx *Context, loc string) error
func (*CassStorage) GetStats ¶
func (s *CassStorage) GetStats(ctx *Context, loc string) (StorageStats, error)
func (*CassStorage) Health ¶
func (s *CassStorage) Health(ctx *Context) error
func (*CassStorage) Load ¶
func (s *CassStorage) Load(ctx *Context, loc string) ([]Pair, error)
type CassandraDBConfig ¶
type CassandraDBConfig struct { Nodes []string Timeout time.Duration BackoffRetries int BackoffMin time.Duration BackoffMax time.Duration // contains filtered or unexported fields }
CassandraDBConfig does what'd you'd think.
This name stutters because it's convenient to dot-import core, which defines 'Storage'.
func ParseConfig ¶
func ParseConfig(config string) (*CassandraDBConfig, error)
ParseConfig generates a CassandraDBConfig from a string. Configuration is parsed from a string of the follow format: host:port,host:port;username;password;keyspace
Click to show internal directories.
Click to hide internal directories.