Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerGetter ¶
type PeerGetter interface { // 第二个参数使用 cachepb.pb.go 中的数据类型 Get(in *pb.Request, out *pb.Response) error }
PeerGetter:这是一个接口,用于从对应 group 查找缓存值。
type PeerPicker ¶
type PeerPicker interface {
PickPeer(key string) (peer PeerGetter, ok bool)
}
PeerPicker:这是一个接口,根据传入的 key 选择相应节点 PeerGetter。
Click to show internal directories.
Click to hide internal directories.