Documentation ¶
Index ¶
- Constants
- func BKDRHash(s []byte) uint32
- func MD5Hash(s []byte) uint32
- type Cluster
- type ConnectionHash
- type ConsistentHashSL
- func (C *ConsistentHashSL) Add(server string, port int) error
- func (C *ConsistentHashSL) Get(key []byte) *gmemcached.GMConnection
- func (C *ConsistentHashSL) Len() int
- func (C *ConsistentHashSL) Less(i, j int) bool
- func (C *ConsistentHashSL) List() []*gmemcached.GMConnection
- func (C *ConsistentHashSL) Set(server ...string) error
- func (C *ConsistentHashSL) Swap(i, j int)
- type SelectorType
- type ServerList
Constants ¶
View Source
const (
VirtualServers = 32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster interface { Add(server string, por int) error Set(server ...string) error Get(key []byte) *gmemcached.GMConnection List() []*gmemcached.GMConnection }
type ConnectionHash ¶
type ConnectionHash struct {
// contains filtered or unexported fields
}
type ConsistentHashSL ¶
type ConsistentHashSL struct {
// contains filtered or unexported fields
}
func (*ConsistentHashSL) Get ¶
func (C *ConsistentHashSL) Get(key []byte) *gmemcached.GMConnection
func (*ConsistentHashSL) Len ¶
func (C *ConsistentHashSL) Len() int
func (*ConsistentHashSL) Less ¶
func (C *ConsistentHashSL) Less(i, j int) bool
func (*ConsistentHashSL) List ¶
func (C *ConsistentHashSL) List() []*gmemcached.GMConnection
func (*ConsistentHashSL) Set ¶
func (C *ConsistentHashSL) Set(server ...string) error
func (*ConsistentHashSL) Swap ¶
func (C *ConsistentHashSL) Swap(i, j int)
type SelectorType ¶
type SelectorType uint32
const ( ModSelector SelectorType = 1 HashSelector SelectorType = 2 )
type ServerList ¶
type ServerList struct {
// contains filtered or unexported fields
}
func (*ServerList) Get ¶
func (S *ServerList) Get(key []byte) *gmemcached.GMConnection
func (*ServerList) List ¶
func (S *ServerList) List() []*gmemcached.GMConnection
func (*ServerList) Set ¶
func (S *ServerList) Set(server ...string) error
Click to show internal directories.
Click to hide internal directories.