Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyRouter ¶
type KeyRouter[T comparable] interface { // Target returns the remote cache server service address of // the cache key. If the cache do not exist in any node, it // returns empty string. Target(k T) string // AddItem pushes a item into a queue with a local // cache server service address in the item. Gossip will take // all the items and send them to other nodes in gossip cluster. AddItem(item gossip.CommonItem) }
KeyRouter is an interface manages the remote cache information.
type QueryClient ¶
type QueryClient interface { ServiceID() string // SendMessage send message to a cache server. SendMessage(ctx context.Context, address string, req *pb.Request) (*pb.Response, error) // NewRequest creates a new request by cmd method. NewRequest(pb.CmdMethod) *pb.Request // Release releases the response. Release(*pb.Response) // Close closes the cache client. Close() error }
func NewQueryClient ¶
func NewQueryClient(sid string, cfg morpc.Config) (QueryClient, error)
Click to show internal directories.
Click to hide internal directories.