mirror of
https://github.com/mailgun/groupcache.git
synced 2024-07-01 02:19:12 +00:00
Merge branch 'master' of github.com:/golang/groupcache
This commit is contained in:
commit
b912ed88a6
|
@ -52,11 +52,11 @@ In a nutshell, a groupcache lookup of **Get("foo")** looks like:
|
|||
|
||||
3. Amongst all the peers in my set of N, am I the owner of the key
|
||||
"foo"? (e.g. does it consistent hash to 5?) If so, load it. If
|
||||
other callers come in (via the same process or via RPC requests
|
||||
other callers come in, via the same process or via RPC requests
|
||||
from peers, they block waiting for the load to finish and get the
|
||||
same answer). If not, RPC to the peer that's the owner and get
|
||||
same answer. If not, RPC to the peer that's the owner and get
|
||||
the answer. If the RPC fails, just load it locally (still with
|
||||
local dup suppresion).
|
||||
local dup suppression).
|
||||
|
||||
## Users
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
// Code generated by protoc-gen-go.
|
||||
// source: groupcache.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package groupcache
|
||||
|
||||
import proto "code.google.com/p/goprotobuf/proto"
|
||||
import json "encoding/json"
|
||||
import math "math"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type GetRequest struct {
|
||||
Group *string `protobuf:"bytes,1,req,name=group" json:"group,omitempty"`
|
||||
Key *string `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetRequest) Reset() { *m = GetRequest{} }
|
||||
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetRequest) ProtoMessage() {}
|
||||
|
||||
func (m *GetRequest) GetGroup() string {
|
||||
if m != nil && m.Group != nil {
|
||||
return *m.Group
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetRequest) GetKey() string {
|
||||
if m != nil && m.Key != nil {
|
||||
return *m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetResponse struct {
|
||||
Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
|
||||
MinuteQps *float64 `protobuf:"fixed64,2,opt,name=minute_qps" json:"minute_qps,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetResponse) Reset() { *m = GetResponse{} }
|
||||
func (m *GetResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetResponse) ProtoMessage() {}
|
||||
|
||||
func (m *GetResponse) GetValue() []byte {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetResponse) GetMinuteQps() float64 {
|
||||
if m != nil && m.MinuteQps != nil {
|
||||
return *m.MinuteQps
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
}
|
Loading…
Reference in New Issue
Block a user