peers

package
v0.0.0-...-379d7ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

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。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL