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
}
A ByteView holds an immutable view of bytes.
type GetterFunc ¶
A GetterFunc implements Getter with a function.
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
A Group is a cache namespace and associated data loaded spread over
func GetGroup ¶
GetGroup returns the named group previously created with NewGroup, or nil if there's no such group.
func (*Group) RegisterPeers ¶
func (g *Group) RegisterPeers(peers PeerPicker)
RegisterPeers registers a PeerPicker for choosing remote peer
type HTTPPool ¶
type HTTPPool struct {
// contains filtered or unexported fields
}
HTTPPool implements PeerPicker for a pool of HTTP peers.
func NewHTTPPool ¶
NewHTTPPool initializes an HTTP pool of peers.
func (*HTTPPool) PickPeer ¶
func (p *HTTPPool) PickPeer(key string) (PeerGetter, bool)
PickPeer picks a peer according to key
type PeerGetter ¶
PeerGetter is the interface that must be implemented by a peer.
type PeerPicker ¶
type PeerPicker interface {
PickPeer(key string) (peer PeerGetter, ok bool)
}
PeerPicker is the interface that must be implemented to locate the peer that owns a specific key.