Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = 7080 DefaultPartitions = 1001 )
View Source
const (
NotReadyErr = "not ready"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
Set(k, v string) error
SetWithTtl(k, v string, ttl time.Duration) error
Get(k string) (string, time.Duration, error)
Del(k string) error
UpsertIndex(index query.Index) error
DropIndex(name string) error
Indexes() []query.Index
Search(index string, criteria *query.Criteria) ([]query.Row, error)
Shutdown()
Name() string
}
type Option ¶
type Option struct {
// Local address to bind to
Port int `json:",omitempty"`
// JoinNodes all the members in the cluster
JoinNodes []string `json:",omitempty"`
// Replicas replication factor
Replicas int `json:"replicas"`
Timeout time.Duration `json:"timeout"`
Retry int `json:"retry"`
Partitions int `json:"partitions"`
GossipNodes int `json:"gossipNodes"`
Logger *log.Logger
}
Click to show internal directories.
Click to hide internal directories.