Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteView ¶
type ByteView struct {
// contains filtered or unexported fields
}
ByteView 一个只读数据结构,用来封装缓存值
type GetterFunc ¶
GetterFunc 实现Getter接口
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) RegisterPeers ¶
func (g *Group) RegisterPeers(peers PeerPicker)
type HTTPPool ¶
type HTTPPool struct {
// contains filtered or unexported fields
}
func NewHTTPPool ¶
type PeerGetter ¶
type PeerGetter interface { // Get(group string, key string) ([]byte, error) Get(in *pb.Request, out *pb.Response) error }
PeerGetter 节点接口
type PeerPicker ¶
type PeerPicker interface {
PickPeer(key string) (peer PeerGetter, ok bool)
}
PeerPicker 节点选择接口
Click to show internal directories.
Click to hide internal directories.